Basic Python programming
Quiz by Natalie Fenn
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 is the correct syntax to print 'Hello, World!' in Python?display('Hello, World!')console.log('Hello, World!')output('Hello, World!')print('Hello, World!')30s
- Q2What is the correct way to write a comment in Python?// This is a comment/* This is a comment */# This is a comment<!-- This is a comment -->30s
- Q3What is the result of 9 / 2 in Python?4.52.254530s
- Q4What is the correct way to declare a variable in Python?create x = 5x : 5x = 5int x = 530s
- Q5What is the correct syntax for a while loop in Python?if condition:while condition:do-while condition:for i in range(10):30s
- Q6What is the output of the following Python code?x = 'Hello'y = 'World!'result = x + ' ' + yprint(result)World!HelloHello World!HelloWorld!30s
- Q7What is the correct syntax to print the value of a variable in Python?print(variable)print value_of_variableprintVariable()print(variable_name)printVariable(value)30s
- Q8Which of the following is not a data type in Python?floatfunctionstringinteger30s
- Q9What does the 'print' function in Python do?Displays output on the consoleCreates a loopDefines a variablePerforms mathematical operations30s