
Python Syntax Quiz

Quiz
•
Computers
•
1st Grade
•
Medium
Adham Elmuntser
Used 1+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Scope of Variables in Python

Quiz
•
1st Grade - Professio...
18 questions
Python Bài 1

Quiz
•
1st - 5th Grade
15 questions
Python Basics

Quiz
•
KG - University
15 questions
iav ML Study Group Pop Quiz 3

Quiz
•
1st - 2nd Grade
17 questions
Итогвая викторина

Quiz
•
1st - 5th Grade
15 questions
ASK F2 -KOD ARAHAN (PYTHON)

Quiz
•
1st Grade - University
16 questions
Python Basics

Quiz
•
KG - University
15 questions
Python Series

Quiz
•
1st - 5th Grade
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
10 questions
Chaffey

Quiz
•
9th - 12th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
22 questions
6-8 Digital Citizenship Review

Quiz
•
6th - 8th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
PBIS Terrace View

Quiz
•
1st - 5th Grade
20 questions
Subject and predicate in sentences

Quiz
•
1st - 3rd Grade
20 questions
Addition and Subtraction facts

Quiz
•
1st - 3rd Grade
9 questions
Good Citizenship and Responsibility

Interactive video
•
1st - 3rd Grade
20 questions
Number Words Challenge

Quiz
•
1st - 5th Grade
20 questions
Place Value

Quiz
•
KG - 3rd Grade
7 questions
Science Safety

Quiz
•
1st - 2nd Grade
25 questions
Math Review

Quiz
•
1st Grade