Master Python by building 100 projects in 100 days. Learn data science, automation, build websites, games and apps! We'll take you step-by-step through engaging video tutorials and teach you everything you need to know to succeed as a Python developer.
Bought on Udemy
Preparing the environment - replit (for first 15 days), coding rooms, Thonny (for debugging) etc.
Pretty easy stuff:
- printing
- string concatenation (with "+")
- single and double quotes, escape char ("\")
- input function, comments ("#") and shortcut: CTRL+/ for toggling the comment
- variables, naming variables (no spaces - use dash "_", no numbers at the beginning)
-
Exercise 1 - Printing
-
Exercise 2 - Debugging Practice
-
Exercise 3 - Input Function
-
Exercise 4 - Variables
-
Day 1 Project: Band Name Generator
This day's content:
-
data types (string, integer, float, boolean)
-
strings numbered from 0 (zero!) Hello[0] -> H, Hello[4] -> o, Hello[-1] -> o
-
integer 1, 123131, 223_323_434
-
float 2.3, 0.001
-
True / False
-
type() function
-
type conversions (casting): str(), int(), float(), bool()
-
casting float to int chops off the end (after the decimal point)
-
operators and shorthands (+=, -=, /= etc.) 2**3 (to to power of 3)
-
dividing - always float
-
floor division // - result is a whole number (int)
-
round()
-
PEMDASLR
Parentheses ()
Exponents **
Multiplication *
Division / (equal with *)
Addition +
Subtraction -
from Left to Right -
score = 0 height = 2.2 isWinning = True print(f"Your score is {score} and height is {height} and you are {isWinning}")
-
formatting print
final_tip = ":.2f".format(bill_per_person)