
Python Syntax Quiz
Authored by Adham Elmuntser
Computers
1st Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax for an if statement in Python?
if x = 5
if x == 5
if x := 5
if x != 5
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you check if two variables are equal in Python?
x == y
x = y
x != y
x < y
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? x = 5 if x > 3: print("Hello") else: print("Goodbye")
Hello
Goodbye
Error
None of the above
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is used to combine multiple conditions in an if statement?
and
or
not
xor
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value of x after the following code? x = 10 x += 5
10
15
5
20
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to check if a variable is in a list?
if x contains [1, 2, 3]
if x in [1, 2, 3]
if x includes [1, 2, 3]
if x has [1, 2, 3]
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? x = 7 y = 3 print(x % y)
2
3
1
0
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
15 questions
5 клас Повторення розгалуження
Quiz
•
1st Grade
15 questions
Hardware y Software
Quiz
•
1st - 2nd Grade
20 questions
Gr. 1 Basic Excel Quiz
Quiz
•
1st Grade
15 questions
Computer Lab Rules
Quiz
•
KG - 8th Grade
15 questions
EVALUACIÓN: PRIMER BIMESTRE
Quiz
•
1st - 5th Grade
20 questions
Soal VLAN
Quiz
•
1st - 12th Grade
17 questions
Computing part 1 U 6-10
Quiz
•
1st Grade
20 questions
Cuestionario Diagnostico
Quiz
•
1st Grade
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
Discover more resources for Computers
20 questions
Telling Time to the Hour and Half hour
Quiz
•
1st Grade
10 questions
Exploring Rosa Parks and Black History Month
Interactive video
•
1st - 5th Grade
20 questions
Place Value
Quiz
•
KG - 3rd Grade
13 questions
Fractions
Quiz
•
1st - 2nd Grade
20 questions
CVC Words
Quiz
•
KG - 1st Grade
15 questions
Place Value tens and ones
Quiz
•
1st Grade
16 questions
Money - Coins
Lesson
•
1st - 2nd Grade
20 questions
Halves and Fourths
Quiz
•
1st Grade