PYTHON TUTORIAL
h
CoolCoderSJ (290)

IMPORTANT LINKS

Comparison -

FeaureInteractive OnlineNon-Int OnlinePDFJupyter
Readable ContentYesYesYesYes
Input your own codeYesNoNoYes (Your code will not be validated)
Run code snippets used in the tutorialNoNoNoYes
Open source codeYesYesYesYes

These links are powered by SJURL , my personal URL Shortener. If these links do not seem to be working, click here and make sure it says Up. If not, ping me below and I'll try to figure out why my site isn't up.

Yay my first post that came onto the 'hot' section of Repl Talk!
omg yay this is beyond expectations, 130 upvotes! Can we get to 140?

Please make sure you are signed into repl.it or else it gives an error

The Easy Way to Learn Python

With this easy to use Python tutorial, you can learn python the easy way

This Python tutorial covers -

  • IDE Comparison (Level0)
  • Your first hello world! (Level1, Print)
  • String vs. Int vs. Float (Level2)
  • Variables (Level3)
  • Conditionals, with if, elif, and else (Level4)
  • User Inputs (Level5)
  • Lists (Level6)
  • Functions (Level7)
  • 2D Lists (Level 8)
  • Loops (Level 9 & 10)
  • Dictionaries (Level 11)
  • Common Modules (Level 12)

Coming Up

I plan to add the following topics later on

Also Supports -

  • ACCOUNTS
    • These accounts are secure, and only you can access your password. Only you can delete your account, and only you can login with it.

      EDIT: I investigated a bit with the account system, and if u don't have a repl.it account/aren't signed in when using this, then ur account may be deleted if ur browser cookies/cache are cleared.

    • Accounts help save your progress so you don't have to redo hours of tutorial again.
  • Different colors to differentiate tutorial and code.
    • In this tutorial, all text isn't white; And if you get deeper inside, you'll learn how to color your text too!
  • Opportunities for you to try out the code you're learning!
    • Throughout the tutorial, you will get Opportunities to type some code, and have it verified by the PythonTutorBot.

Contributing

While I cannot allow anyone to directly edit my tutorial, you can contribute by making a pull request on the GitHub Repo. (Find it here)

Updates

LISTS GOT ADDED!

Functions are here!

Welcome, 2D Lists!

Loops just got added!

Dictionaries are here

The manual level picker now also shows what each level has, instead of just the number.

Common Modules

Bonus lesson, level0, ide comparison, added

Tell me if you have more you would like to see!
Try it out here
Btw I made this whole thing in 3 days

Note: This whole tutorial was built on my favorite IDE, repl.it

Update:
A while back, I finally set up my own URL shortener with tracking statistics and changed the link to my shortened one, and the results were amazing! The link got 14 views in an hour alone! thanks for your support everyone!

You are viewing a single comment. View All
bot502 (1)

@CoolCoderSJ Do you know how to restart a program in python?
Like if you do:
Thingy = input("Do you want to restart? ")
if thingy == 'yes' or 'Yes:
Your answer here
I tried using return, but it doesn't work :(

CoolCoderSJ (290)

@bot502 return is only usually the end of a function. Return would be like

def wow():
    return "hi"

d = wow()

#d is "hi"

To restart a repl use

import sys
import os
os.execv(sys.executable, ['python'] + sys.argv)
CoolCoderSJ (290)

@bot502 hey also another tip is use .lower()
so

thingy = input("Do you want to restart? ")
if thingy.lower() == 'yes':
    #Func here

or .upper()

thingy = input("Do you want to restart? ")
if thingy.upper() == 'YES':
    #Func here
bot502 (1)

@CoolCoderSJ Oh and how do you do that thing.
Like make the script gray.
Like make a code in the comments.

bot502 (1)

@CoolCoderSJ And I'm making a direct print project/code thingy.
I'm not using def

bot502 (1)

@CoolCoderSJ I can share it with you.

CoolCoderSJ (290)

@bot502 gotchu
if u want to add code, type 3 of these --> ``` , then right in front of it type the language, then on lines under it type your code, and end with ```

Example -

```python
Code here
```