Skip to content
Sign upLog in
← Back to Community

PYTHON TUTORIAL

Profile icon
CoolCoderSJHacker

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!

Link Clicks so far - 592 👀
EDIT: I obviously have a lot more clicks, but i'm not going to be editing this as frequently.

Voters
Profile icon
CosmicBear
Profile icon
JamesCrowfoot
Profile icon
NuraeniRasida
Profile icon
Flippybear
Profile icon
soralb
Profile icon
IceWing099
Profile icon
tougand
Profile icon
NotRati
Profile icon
abhinav2911
Profile icon
AmoghTheCool
Comments
hotnewtop
Profile icon
CoolCoderSJ

Reply to this thread if you want to be notified for new updates.

Profile icon
Leroy01010

me

@CoolCoderSJ

Profile icon
CoolCoderSJ

@Leroy01010
okie
I plan to add at least another level by today or tomorrow

Profile icon
CoolCoderSJ

@Leroy01010
Lists have been added! Check out level 6 for lists.

Profile icon
Leroy01010

ok

@CoolCoderSJ

Profile icon
CoolCoderSJ

@Leroy01010
I do be cranking out levels....
Functions have been added! (level 7)

Profile icon
Leroy01010

ok

@CoolCoderSJ

Profile icon
CoolCoderSJ

@Leroy01010
i feel like im on fire...
2d lists are here! (level 8)

Profile icon
CoolCoderSJ

@Leroy01010
loops level 9&10

Profile icon
CoolCoderSJ

@Leroy01010
dictionaries level 11

Profile icon
CoolCoderSJ

@Leroy01010
common modules level 12

Profile icon
supcoolak

@CoolCoderSJ
it's me

Profile icon
CoolCoderSJ

@supcoolak
who.... are u.....? or did u mean that u just want to be pinged?

Profile icon
supcoolak

@CoolCoderSJ
Yeah, I wanted to be pinged.

Profile icon
CoolCoderSJ

@supcoolak
ok

Profile icon
CoolCoderSJ

@supcoolak
@Leroy01010
Bonus Lesson
IDE Comparison
Level 0
Added

Profile icon
supcoolak

@CoolCoderSJ
Yay!

Profile icon
CoolCoderSJ

@supcoolak
@Leroy01010

by the way, the PDF version is here!
(I also added these cause a lot of people wanted it but didn't have repl.it accounts)

View non interactive online here
View Downloadable PDF here

Profile icon
supcoolak

@CoolCoderSJ
This is so cool! (Totally didn't send this to a friend struggling to start learning Python). I wanted to say something about Atom, you can run code in Atom if you install the script package.

Profile icon
CoolCoderSJ

@supcoolak
wait really? thanks! (for both points)

Profile icon
CoolCoderSJ

@supcoolak
@Leroy01010
.ipynb version made, (hosted on Google Colab)
Find it here
This adds support for running code snippets throughout the tutorial and seeing live results

Profile icon
Leroy01010

ok

@CoolCoderSJ

Profile icon
supcoolak

@CoolCoderSJ
Hey! Came here to say thank you! My friend (the one I recommended this to) and I are now making a game using pygame because of you!

Profile icon
CoolCoderSJ

@supcoolak
yay, that's great!
pygame is awesome, hope you guys have fun!

Profile icon
[deleted]

kk


@CoolCoderSJ

Profile icon
Dekay4

me too!!


@CoolCoderSJ

Profile icon
candies

ok


@CoolCoderSJ

Profile icon
Bookie0

Pretty nice, some tips:

The first thing to note is that there are no semicolons unlike other languages

wdym unlike other languages? not all languages have semicolens

maybe it's me, but perhaps add a space between the ] and the text? And perhaps a > or something to prompt the user?
Screen Shot 2020-12-19 at 3.03.06 PM

And when I create an account, there's text but I don't get to see it as it shows for like 1 sec then disappears...

The 'Print' Statement

print doesn't have a capital P

As a note, please use single quotes, NOT double quotes.

both can be used, you should be able to accept both lol

print('Hello World')

Hello World! has an exclamation mark!

this should work, it gives the same output as what you wrote
Screen Shot 2020-12-19 at 3.08.15 PM

'hullo' . Please use single quotes. Define it below

again, you don't need single quotes lol you can use double quotes.

Anyways, the rest is pretty fine! :)

Profile icon
CoolCoderSJ

@Bookie0
hmm
thanks for ur feedback

  1. I do agree, I think I should add a >
  2. Yeah lol sorry I hate js ill change that
  3. Yeah hmm I changed that later on, I must have forgotten to accept both in the earlier levels
  4. I didn't know that, ill add an exclamation mark
  5. U have a space between print and (

I don't think python accepts spaces

Thanks for ur feedback!

Profile icon
CoolCoderSJ

@Bookie0
again, thanks for the feedback, i did change a couple of things, especially the double quotes and signup message timeout.

Btw it was supposed to tell u this after signing up
"Great! Your username is "+username+" and your password is "+password+" Don't worry, only you can access these passwords and usernames, and all data is encrypted. You're going to be redirected to the main page now, Login with your new credentials to get started."

Profile icon
Bookie0

@CoolCoderSJ

ok
ok
ok
ok
uhhhhhhhhh
python does accept spaces lol if you didn't know that...
Screen Shot 2020-12-19 at 8.53.02 PM

you can also put a lot of space:

Screen Shot 2020-12-19 at 8.53.21 PM

np! :D

Profile icon
Bookie0

@CoolCoderSJ
oo ok cool! ;)

Profile icon
CoolCoderSJ

@Bookie0
whoa cool I didn’t know that....

Profile icon
Bookie0

lol cool

@CoolCoderSJ

Profile icon
CoolCoderSJ

@Bookie0
all right i did have to break yesterday, but as of now, it accepts spaces between print and (.

Profile icon
Bookie0

@CoolCoderSJ

Screen Shot 2020-12-20 at 12.23.52 PM

this normal? pretty bright lol

Profile icon
CoolCoderSJ

@Bookie0
whoa uh u must have some external script running

This is what I see

Capture

and this is after I disabled all of my extensions

Profile icon
Bookie0

@CoolCoderSJ
yea I have some Chrome Flags..

Due to application errors, for new lines, type a | right after the first line, and pretend all space after that is a new line.

seriously?

Screen Shot 2020-12-20 at 12.27.09 PM

what's wrong with this?

and what about this?
Screen Shot 2020-12-20 at 12.29.37 PM

also you should add colors for the errors, and also specify what went wrong. You should also add more stuff! :)

Profile icon
CoolCoderSJ

@Bookie0
yeah i really need to fix this, didn't think it was that broken

for the first one:
I think ur doing it fine, and for now u can use the manual level picker since inputs only come at the end.. i need to go through my code and accept spaces everywhere

for the second one: Again same thing:
I think ur doing it fine, and for now u can use the manual level picker since inputs only come at the end.. i need to go through my code and accept spaces everywhere

Also I ask you to put the | because I don't know how to accept multi line inputs in the console

Profile icon
Bookie0

@CoolCoderSJ
yez yez I do know I'm doing it fine, I'm just highlighting that ur "bot" can't see that it is correct and you should prolly correct it! ;0

Also I ask you to put the | because I don't know how to accept multi line inputs in the console

¯\_(ツ)_/¯

Profile icon
CoolCoderSJ

@Bookie0
all right i went through my code, and I'm pretty sure that it accepts any number of spaces now (hopefully)
I do plan to add functions, lists, dictionaries, and 2d lists in the future, any suggestions for more?

Profile icon
Bookie0

@CoolCoderSJ
imports? eg random, time, etc.
maybe useful pieces of code (slowprint, clear screen, ANSI escape codes for colors and bold/italic)

Profile icon
CoolCoderSJ

@Bookie0
oof ok

Profile icon
CoolCoderSJ

@Bookie0
ohk ill prob add a popular modules and their commands section

Profile icon
Bookie0

👍

@CoolCoderSJ

Profile icon
CoolCoderSJ

@Bookie0
yay! I found a way to accept multi line input, so now u can hit enter and type normally for the if statement

Profile icon
Bookie0

yez

@CoolCoderSJ

Profile icon
Bookie0

@CoolCoderSJ
yay

Profile icon
elipie

@CoolCoderSJ
make lexer instead of something else...

Profile icon
CoolCoderSJ

@elipie
wot?

Profile icon
elipie

@CoolCoderSJ
well.. python is the most misused(and the source of spam on replit) and really slow. You want something compiled

Profile icon
CoolCoderSJ

@elipie
wait let me get this right, u hate python because ppl spam python repls? wut a twisted logic
U don't need compiling, Pythons more lightweight
wdym by misused

Profile icon
elipie

@CoolCoderSJ
hmm, i see you have been on repl as long as me... hmm Have u been active on repl latley? lots of spamming lol

Yes u do ned compile... fast af boii

while python is:
[insert turtle with python head here]

Profile icon
CoolCoderSJ

@elipie
I am active, i did see the spam, but u cant base judgement of a language on that.
Compiling can be fast, but its really heavy, and python has tons more than just turtle.
Ever heard of web.py, flask, web2py, etc?
Reddit used to run on web.py, and Netflix and Lyft runs on flask