
Python Iteration and Selection Quiz

Quiz
•
Information Technology (IT)
•
7th Grade
•
Hard

John Heatley
Used 2+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the main purpose of using a trace table in Python programming?
To store large amounts of data
To keep track of variable values as a program runs
To create graphics
To speed up the code
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an example of a constant in Python, according to naming conventions?
userName
MAX_SCORE
totalMarks
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to write a variable name in camel case?
totalmarks
TotalMarks
totalMarks
TOTALMARKS
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which Python statement is used for selection (making decisions)?
for
if
def
import
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code output? ```python x = 5 if x > 3: print("High") else: print("Low") ```
High
Low
5
Error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an example of iteration in Python?
if x > 10:
for i in range(5):
x = 10
print("Hello")
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What value will be printed last in the following code? ```python for i in range(3): print(i) ```
0
1
2
3
Create a free account and access millions of resources
Similar Resources on Wayground
22 questions
ÔN TẬP CRV1

Quiz
•
6th Grade - University
18 questions
Mastering Python Basics

Quiz
•
7th Grade
21 questions
PYTHON 1

Quiz
•
6th - 8th Grade
21 questions
Cfa Block coding

Quiz
•
7th Grade
20 questions
soal algoritma dan pemograman

Quiz
•
7th Grade
15 questions
Small Basic Programming Quiz

Quiz
•
7th Grade
23 questions
List | Set | String - Nâng cao (1)

Quiz
•
6th - 8th Grade
16 questions
While Loop Iteration Quiz

Quiz
•
7th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade