18.2 - Printing Strings
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('Python!')?
💡 Hint: Consider what the print function does.
Write a print statement using double quotes to display your name.
💡 Hint: Use the print function with quotes around your name.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What is the default separator for print() when printing multiple items?
💡 Hint: Think about how items appear when printed together.
True or False: You can print numbers directly using the print() function.
💡 Hint: Consider the examples of using print with numbers.
2 more questions available
Challenge Problems
Push your limits with advanced challenges
Given the variables name = 'John' and score = 88, create a print statement using f-string to display 'John scored 88 marks.'
💡 Hint: Remember how to use f-strings to include variable values directly in the output.
You have a variable temperature = 20. Write code that prints 'The temperature is 20 degrees.' using .format().
💡 Hint: You need to use the .format() method to insert the value for temperature.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.