18.8 - Printing Variables
Enroll to start learning
You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.
Practice Questions
Test your understanding with targeted questions
What is the output of print('Hello, World!')?
💡 Hint: It's a basic greeting message.
If name = 'Alice', what does print('Name:', name) display?
💡 Hint: It's showing the stored name variable.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What will print('Hello' + ' ' + 'World') output?
💡 Hint: Think about how strings combine.
Is the following statement true? print('Age is ' + str(age)) correctly shows the value of age.
💡 Hint: Remember data types when combining!
1 more question available
Challenge Problems
Push your limits with advanced challenges
You have variables: username = 'Jane' and score = 88. Write a print statement that uses both variables in a meaningful sentence.
💡 Hint: Use f-string to include variables within a sentence.
What would happen if you try to print a string and an integer directly using print('I am ' + age)?
💡 Hint: Think about the compatibility of the types.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.