Skip to content
Sign upLog in
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
147

Python Lesson!

stoporinjail
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!

2 years ago
You are viewing a single comment. View All
3
2
JWZ6
JWZ6

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

2 years ago
10
Flyingcrabs
Flyingcrabs

Because python is the best language in the world

@Whippingdot
@JWZ6

2 years ago
2
JWZ6
JWZ6

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

2 years ago
5
FlaminHotValdez
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.

2 years ago
2
Flyingcrabs
Flyingcrabs

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

@FlaminHotValdez

2 years ago
2
stoporinjail
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

2 years ago
3
Whippingdot
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

2 years ago
3
FlaminHotValdez
FlaminHotValdez

@stoporinjail
typing isn't everything

python is extremely inefficient compared to c and c++

2 years ago
3
IntellectualGuy
IntellectualGuy

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

2 years ago
2
FlaminHotValdez
FlaminHotValdez

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

2 years ago
2
Nearday
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.

2 years ago
2
JWZ6
JWZ6

@pythoncooluser
i made one on python TURTLE

2 years ago
2
Nearday
Nearday

@JWZ6
Oh cool can I see it?

2 years ago
2
Nearday
Nearday

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

2 years ago
2
ArchilBeraia
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.

2 years ago
2
Nearday
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.

2 years ago
1
AvOcAdO506
AvOcAdO506

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

1 year ago
1
Bluelight4251
Bluelight4251

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

1 year ago
1
Whippingdot
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

1 year ago
1
Whippingdot
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

1 year ago
1
JWZ6
JWZ6

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

1 year ago
1
JWZ6
JWZ6

@Whippingdot
I made a tutorial on python turtle lol

1 year ago
1
Whippingdot
Whippingdot

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

@JWZ6

1 year ago
1
MultiLangCoder
MultiLangCoder

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

1 year ago
1
Whippingdot
Whippingdot

I forgot python turtle now :)

@JWZ6

1 year ago
1
JWZ6
JWZ6

Lol u can check it out

@Whippingdot

1 year ago