Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What is the output of print('Python!')?
Consider what the print function does.
Write a print statement using double quotes to display your name.
Use the print function with quotes around your name.
What is the default separator for print() when printing multiple items?
Think about how items appear when printed together.
True or False: You can print numbers directly using the print() function.
Consider the examples of using print with numbers.
Given the variables name = 'John' and score = 88, create a print statement using f-string to display 'John scored 88 marks.'
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().
You need to use the .format() method to insert the value for temperature.
6 more questions in this section. Enroll free to practise them all.
Enroll free