
PYTHON QUIZZ
Authored by Auzoom four
Education
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Hey there, coding wizards! Kabir and Myra are having a friendly competition to see who can figure out the output of this Python code first:
x = 10
y = 5
x, y = y, x + y
print(x, y)
Can you help them out? What will be printed when they run this code?
10 5
5 15
15 10
5 10
2.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Our friend Aisha is trying to solve a little puzzle with numbers! Can you help her figure out what the value of x will be after she runs the following code?
x = 10
x += 5
x *= 2
x -= 3
20
24
23
25
3.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Hey there, coding wizards! Can you help Dhruv, Aarav, and Anika figure out which of the following variables is a valid Python variable name?
3variable
_variable
variable!
None
4.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Hey Aashi! If you were to explain the magic of the ternary operator in Python to your friend Ananya, how would you phrase it? Which of the following options captures the correct syntax?
x if condition else y
if x then y else z
x ? y : z
condition ? x : y
5.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Hey there, coding wizards! 🧙♂️ Which of the following operators do you think is a no-show when it comes to comparing two values in Python?
a) ==
b) <=
c) !=
d) =>
6.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Hey there, coding wizards! What do you think will be printed after the following Python code is executed?
x = 5
if x == 5:
print("Equal")
else:
print("Not Equal")
Will Alisha and Kavya cheer for the right answer, or will Aashi be left puzzled? Let's find out!
Equal
Not Equal
None
Error
7.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Hey there, coding wizards! Ria, Advait, and Myra are having a debate about a tricky Python expression. Can you help them settle it? What do you think is the result of the following expression?
not (True and False)
True
False
None
Error
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?
Similar Resources on Wayground
10 questions
Plagiarism and Referencing
Quiz
•
University
10 questions
What is water
Quiz
•
KG - Professional Dev...
10 questions
becoming a Global teacher
Quiz
•
University
14 questions
Study Abroad
Quiz
•
9th Grade - Professio...
11 questions
Verb Konjugations
Quiz
•
12th Grade - Professi...
10 questions
PTSD in Students
Quiz
•
University
15 questions
Intubation
Quiz
•
University
10 questions
SIMULADOR PREMIO
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade