
Basic Print Statements
Quiz by Paul Cummins
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Measure skills
from any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
With a free account, teachers can
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
9 questions
Show answers
- Q1What does the print statement do in Python?It outputs text or variables to the console.It creates a new variable.It closes the Python program.It saves data to a file.30s
- Q2Which of the following is the correct syntax to use the print statement in Python?print('Hello, World!)print('Hello, World!')print[Hello, World!]30s
- Q3What will the following code output? print('Python is fun!')Python is not fun!No outputSyntax ErrorPython is fun!30s
- Q4What will happen if you forget the parentheses in a print statement, like this: print 'Hello'?It will print 'Hello' normally.It will create a new variable.It will print nothing.It will raise a SyntaxError.30s
- Q5In Python, how can you print multiple items in one print statement?By using plus signs to concatenate them.By placing items in square brackets.By using semicolons to separate them.By separating the items with commas.30s
- Q6What will the following code print? print('The answer is', 42)42The answer isThe answer is 42!The answer is 4230s
- Q7What is the correct way to include a string and a variable inside the print statement?print('My age is' age)print('My age is' + age)print('My age is', age)print('My age is: age')30s
- Q8Which of the following is NOT a valid syntax for a print statement in Python?print('Hello, World!')print 'Hello'print('Hello', 5)print('Hello')30s
- Q9What will be the output of the following code? print('2 + 2 =', 2 + 2)2 + 2 = 22 + 2 = 222 + 2 = 42 + 2 = 2 + 230s