Wrap up
Estimated time: 5 minutes
Summary
- Comments let us put text in a program that will be ignored by the program but are useful for humans reading the program. Comments in Python start with the
#sign. - Variables are a way to store data with a name, so you can use it later. Creating a variable looks like
name = "Mo"orage = 22 - Strings are the Python data type for text, and they look like
"hello world" - Ints and Floats are the Python data types for numbers, and they look like
9or0.7 - Python can use operators like
+to add numbers or concatenate strings printshows output to the user, andinputasks the user to type in text- You can format the output in a variety of ways using f-strings
- Strings can be concatenated (added together) using the
+and usingf-strings
How was this lesson?
Feedback is a gift! We use your feedback to improve our lessons for future students.
Thank you!