NEW
Font size
WorksheetsGrade 7 Python Programming Quiz
Total questions: 20
Worksheet time: 10mins
Who created the Python programming language?
Bill Gates
Guido van Rossum
Elon Musk
Mark Zuckerberg
When was Python first released?
1991
2000
1985
2010
Which of the following is the correct way to print "Hello World" in Python?
echo "Hello World"
print("Hello World")
say "Hello World"
printf("Hello World")
What symbol is used to start a comment in Python?
//
--
#
/*
What does the following code print? print(5 + 3)
53
8
5 + 3
Error
Which data type is used to store text in Python?
int
float
string
bool
What will this code output? print("Hello" + " World")
HelloWorld
"Hello" + "World"
Hello World
Error
What does this code do?
name = "Sarah"
print("Hi", name)
Prints Hi name
Prints name Sarah
Prints Hi Sarah
Gives an error
What does the input() function do in Python?
Shows output
Gets user input
Prints text
Defines a loop
Which keyword is used to make decisions in Python?
repeat
if
define
choose
What will be the output of this code? print("I love" + " Python")
I love Python
I lovePython
"I love" + " Python"
I + Python
What will the following code print? print(10 - 4)
6
104
10 - 4
Error
What is the purpose of a variable in Python?
To display messages on the screen
To store information that can be used later
To create graphics
To turn off the computer
What does this code print? name = "Aisha" print("Hello", name)
HelloAisha
Hello name
Hello Aisha
name Hello
What will be the output of this code?
x = 10
y = 5
print(x * y)
15
105
5
50
Why is the language called "Python"?
It's named after a snake
The creator liked Monty Python comedy
It's short for "Program Language"
Python is fast like a snake
What does this code print?
age = 14
if age > 13:
print("You are a teenager")
Nothing
You are a teenager
age . 13
error
Python is known for being...
Difficult to read
Used only in games
Easy to learn and read
A low-level language
What data type is the value 42 in Python?
string
float
int
bool
Which of these can Python be used for?
Web development
Data science
Game design
All of the above
