
Python Programming Quiz
Authored by Fadi Fadi
Information Technology (IT)
7th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function generates a whole number between 5 and 15, inclusive?
random.random(5, 15)
random.randint(5, 15)
random.choice(5, 15)
random.number(5, 15)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this code print? x = 9 if x = 15: print("A") elif x >= 10: print("B") else: print("C")
A
B
C
Error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does this code print? if 10 != 5: print("Different") else: print("Same")
Same
Error
10
Different
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of this code? num = 3 if num % 2 == 0: print("Even") else: print("Odd")
Even
Odd
3
Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these operators means “equal to”?
=
==
:=
equals
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword follows an if condition if the first condition is false and a second needs to be checked?
elif
else
check
elseif
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does this code output? age = 17 if age >= 18: print("Adult") else: print("Minor")
Adult
Error
Minor
17
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?