Hello World
Get started with Python syntax in this lesson and then create a point of sale system for a furniture store!
StartKey Concepts
Review core concepts you need to learn to master this subject
Comments
Arithmetic Operations
Plus-Equals Operator +=
Variables
Modulo Operator %
Integers
String Concatenation
Errors
Comments
Comments
# Comment on a single line
user = "JDoe" # Comment after code
A comment is a piece of text within a program that is not executed. It can be used to provide additional information to aid in understanding the code.
The #
character is used to start a comment and it continues until the end of the line.
- 8Computers absolutely excel at performing calculations. The “compute” in their name comes from their historical association with providing answers to mathematical questions. Python performs addition…
- 9Variables that are assigned numeric values can be treated the same as the numbers themselves. Two variables can be added together, divided by 2, and multiplied by a third variable without Python di…
- 12The + operator doesn’t just add two numbers, it can also “add” two strings! The process of combining two strings is called string concatenation. Performing string concatenation creates a brand ne…
- 13Python offers a shorthand for updating variables. When you have a number saved in a variable and want to add to the current value of the variable, you can use the += (plus-equals) operator. # Firs…
- 14Python strings are very flexible, but if we try to create a string that occupies multiple lines we find ourselves face-to-face with a SyntaxError. Python offers a solution: multi-line strings. By…
What you'll create
Portfolio projects that showcase your new skills
Block Letters
Display your initials on the screen in block letters and create an ASCII art.
Receipts for Lovely Loveseats
Keep receipts for your lovely loveseats. Programming is a treat with this sweet suite of feats! Use strings and numbers to save a catalog of furniture, then perform concatenation and math calculations to create a receipt.
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory