Printing Output
print() displays a value on the screen. It is how you see what your program
is doing.
Printing a value
Put the value inside the brackets. Text goes in quotes. Numbers do not.
print("Hello!")print(42)Each print() ends with a new line, so these two calls print two lines.
Printing several things at once
Separate values with commas. print() puts one space between them.
print("Score:", 10)This prints Score: 10 on one line.
See also: Variables, String Formatting, Debugging.
Your turn
Print the message shown below using one print() statement.
🎯 Goal — make it print exactly:
Ready to begin!
# Add one print statement.Advanced reading
- Special characters in strings — new lines, tabs and quotes inside the text you print.
- Changing what print() puts between and after values — the
sepandendoptions.