Skip to content
Sign upLog in
← Back to Community

Python Lesson!

Profile icon
stoporinjail

Hello everyone! I have decided to make lessons for Python, right here! This might be converted into an interactive repl, depending on how it goes. This is meant for completely new people to Python.

What we will be learning

Lesson 1

  • Printing
  • Variables
  • F strings

Lesson 2

  • Multiple value variables
  • Imports: Random, time
  • Dictionaries
  • Loops
  • If, elif, else statements
  • User inputs
    I plan to have 6 topics for each lesson excluding this one.

Lesson 1:

This post will be lesson 1. I will post another in a few days for lesson 2.

Printing

In Python, the most important thing you will have to know is printing! It prints (writes) out a value.

How to:

print("value")

Example:

print("Hello world")

If you run the program, the console (black screen on the right) will say Hello world

Variables

Variables are like a box in Python. You can put things in the box, remove things in the box, and even find out what's in the box.

How to:

variable_name = "Value"

or for numbers:

variable_name = number

The number does not go into quotes.
To print out a variable:

print(variable_name)

or

print(variable_name, "Hi")

Examples:

name = "Bob" print("Hi", name)

Output: Hi, Bob

F Strings

You can use an F string to print out variables and values more efficiently.

How to:

variable_name = "value" print(f'your text here {variable_name}')

You must use the f before the quotes.

Example:

name = 'Bob' print(f"Hello, {name}")

Output: Hello, Bob

Conclusion

So that was lesson 1! Have a great day! Lesson 2 will be released soon.

Other Lessons:

Other lesson links will be posted here.
Lesson 2: https://replit.com/talk/learn/Python-Tutorial-2/139771

Announcements

8/17/2021 Thank you for 100 likes!

Voters
Profile icon
gaurav830834442
Profile icon
FatihKazanci
Profile icon
VaishnaviDhakwa
Profile icon
tcscerjkhang
Profile icon
diamondamon
Profile icon
mj-codings
Profile icon
SHUBHAMYADAV28
Profile icon
Omar-EloyEloy
Profile icon
IsaacLian
Profile icon
FirefoxArya
Comments
hotnewtop
Profile icon
Richardcoolcool

cool and thx!

Profile icon
JohnDGomez

@Richardcoolcool
Yeah, I agreed with you. I want to learn the Python programming language and it is really very hard for me. Because of this, I am searching for lessons online regarding this language. I am happy when I found your post. Thanks for sharing those lessons with us. I also have to submit my assignments but I ain't worry about them because I have found its solution with the help of https://www.grabmyessay.com/custom-essay website. Now I am only concentrating on learning the Python language.

Profile icon
Whippingdot

WHY DOES IT HAVE TO BE PYTHON

Profile icon
JWZ6

@Whippingdot
i know right? there are way too many python tutorials

Profile icon
Flyingcrabs

Because python is the best language in the world

@Whippingdot
@JWZ6

Profile icon
JWZ6

@Flyingcrabs
ik but there are at least 50 tutorials on Python

Profile icon
Flyingcrabs

I guess so

@JWZ6

Profile icon
JWZ6

@Flyingcrabs
wow yup

Profile icon
FlaminHotValdez

@Flyingcrabs
that's extremely debatable about what language is best, each language has its own strong points in weak points.

html, css, js good for webdev.
C++ and c extremely fast.
Python very high level and easy to learn.

Each language has its own quirks, there is no "best" language. And even if python were the best language in the world, that doesn't justify the insane amount of tutorials about it that cover only the basics.

Profile icon
Flyingcrabs

well to see most of my projects are well html,css and python

@FlaminHotValdez

Profile icon
stoporinjail

Personally, Python is the best because it's super easy to learn and doesn't require a lot of typing
c & C++ is too much typing
Idk about HTML, css or js but they're ok ig

@FlaminHotValdez

Profile icon
Whippingdot

bruh in C and C++ you can do more things. It is like Java, you can create games with them. Python is a growing language, and is easier to write, but you can do less complex things with it. With libraries though, you can match the things C++ and C does, but it will be slower in execution. No-one would create an OS in Python because C and C++ would be way faster, and right when you press a button, you will get instant feedback.

@stoporinjail

Profile icon
FlaminHotValdez

@stoporinjail
typing isn't everything

python is extremely inefficient compared to c and c++

Profile icon
IntellectualGuy

@FlaminHotValdez
You gotta agree that python is known for ML.

Profile icon
FlaminHotValdez

@IntellectualGuy
yes, but c and c++ are still much efficient. each language has its pros and cons, there is no clear best language

Profile icon
stoporinjail

@FlaminHotValdez
yeah i guess so

Profile icon
Nearday

@JWZ6
Yeah like literally there are so many python tutorials and it is really annoying because I already know python and I think there should be more tutorials on different languages.

Profile icon
Nearday

@FlaminHotValdez
I agree.

Profile icon
JWZ6

@pythoncooluser
i made one on python TURTLE

Profile icon
Nearday

@JWZ6
Oh cool can I see it?

Profile icon
JWZ6

@pythoncooluser
yes here u go: https://replit.com/talk/learn/A-Crash-Course-In-Python-Turtle/138756

Profile icon
Nearday

@JWZ6
I already know turtle in python it is really easy but it is a really good tutorial I must say.

Profile icon
ArchilBeraia

@Whippingdot
python has some features that c++ and other languages dont have. Python is much easier to start with when entering coding world. Even thought python is slow it is much understandable for begginers.

Profile icon
Nearday

@JWZ6
I was wondering if you would answer the question that I have posted because all the other ones are not working so please go to my profile and answer the question. If you click posts, you will see the question.

Profile icon
AvOcAdO506

@FlaminHotValdez
ikr they don't even cover python turtle or /n and those are very basic

Profile icon
Bluelight4251

@JWZ6
I love Python!!!!!!! Just view my profile and You'll see.

Profile icon
Whippingdot

True, and that is why I would recommend it for beginners, but they main reason for this thread was because I asked why another Python tutorial. Python tutorials are already of so many so making more would be a waste of your time. After learning Python, people might strive to learn more Programming Languages (like me) and so for those languages, like C++, or C#, or JS, or Nodejs, or Elixir, or Swift, making tutorials would actually be a good use of time or at least a help to the people who want to learn those languages.

@ArchilBeraia

Profile icon
Whippingdot

why didn't i get pinged for this...it is in my comment thread after all. Anyway yup absolutely correct i definitely know python turtle ;)

@AvOcAdO506

Profile icon
JWZ6

@Bluelight4251
I also like it too. It's just that there are too many tutorials on it. das all

Profile icon
JWZ6

@Nearday
thx

Profile icon
JWZ6

@Whippingdot
I made a tutorial on python turtle lol

Profile icon
Whippingdot

hmmmm i don't think i will check it out cause I already know python turtle ;)

@JWZ6

Profile icon
JWZ6

@Whippingdot
oh gud for u :)

Profile icon
MultiLangCoder

Python literally scores lowest on the language efficiency index. While C goes all the way to the [email protected]

Profile icon
Whippingdot

I forgot python turtle now :)

@JWZ6

Profile icon
JWZ6

Lol u can check it out

@Whippingdot

Profile icon
JWZ6

yay

Profile icon
[deleted]

@JWZ6
Ha I See You, Hello

Profile icon
JWZ6

@alsike
hoi

Profile icon
[deleted]

@JWZ6
Lmao

Profile icon
JWZ6

@alsike
how did this get so popular

Profile icon
[deleted]

@JWZ6
The Tutorial-?

Profile icon
JWZ6

@alsike
yuh

Profile icon
[deleted]

@JWZ6
Dunno, It's Pretty Cool Tho

Profile icon
JWZ6

a bit too basic in my opinion

@alsike

Profile icon
[deleted]

@JWZ6
I Agree, Lacks Info Too, But It's Not Terrible

Profile icon
JWZ6

@alsike
i mean yes

Profile icon
[deleted]

@JWZ6
Lol Ye

Profile icon
JWZ6

@alsike
yuh

Profile icon
CatGirlMeow

I'm new and this is so confusing to me. BTW I don't know anything about codes.

Profile icon
robottommy150

is there good ones to make a video game?

Profile icon
NewbieLeo

print('{} good!'.format('Sounds'))

Profile icon
RuslanHaris

nice

Profile icon
prolomic

Cool and great lessons, but you can use teams/multyplayer programming to show it live!

Profile icon
jp1003

Nice

Profile icon
stoporinjail

Ok whoever's upvoting my repl by creating a lot of accounts, stop it.

Profile icon
stoporinjail