Part of Python: Zero to Warrior, a free Python course for beginners. Video: https://youtu.be/U5zgHkmNhbo · Full course: https://www.youtube.com/playlist?list=PLcsbg964FAwc
print()shows text on the screen. The text goes inside quotes, which makes it a string.- A line that starts with
#is a comment: a note for people. Python skips it. - Python runs a file from the top to the bottom, one line at a time.
print()with nothing inside prints an empty line.
solution.py: the program from the video.starter.py: the "your turn" exercise, with TODOs to fill in.
python3 solution.py # Mac
python solution.py # Windows
- Print three lines about yourself: your name, a hobby, and why you're learning Python.
- Comment out the middle line. Run it again. What changed?
- Make the mistake on purpose: change
printtoPrintand run it. Read the last line of the error, then fix it.