What does the following code print? for i in range(3): print(i)

Python Programming Quiz

Quiz
•
Information Technology (IT)
•
8th Grade
•
Easy
Fadi Fadi
Used 3+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
1 2 3
0 1 2
0 1 2 3
1 2
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this code? for letter in "cat": print(letter)
cat
c a t
c t a
a c t
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these loops prints numbers 1 to 5?
for i in range(1, 6): print(i)
for i in range(5): print(i)
for i in range(1, 5): print(i)
for i in range(6): print(i)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this code do? for i in range(2, 10, 2): print(i)
Print 2 to 10
Print even numbers between 2 and 10
Print 10 numbers
Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which loop will NOT print anything?
for i in range(0): print(i)
for i in range(3): print(i)
for i in range(1): print(i)
for i in range(1, 4): print(i)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to access "banana" from this list? fruits = ["apple", "banana", "cherry"]
fruits(1)
fruits[2]
fruits[1]
fruits[banana]
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output? numbers = [10, 20, 30] print(len(numbers))
2
3
4
Error
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
Python 8 klasa

Quiz
•
8th Grade
15 questions
5-sinf. Kompyuter va Internet Asoslari

Quiz
•
5th Grade - University
20 questions
quiz1B1

Quiz
•
7th Grade - University
22 questions
Unit-8 (QB64) Year-6

Quiz
•
6th Grade - University
15 questions
6-sinfl. Ofis dasturlari va Scratch

Quiz
•
6th Grade - University
15 questions
Python Data Structures

Quiz
•
6th - 8th Grade
20 questions
Chapter 12 Exam Review

Quiz
•
8th Grade
17 questions
Programski jezik Python

Quiz
•
8th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Information Technology (IT)
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University
44 questions
El fin del año- 7th

Quiz
•
7th - 12th Grade
40 questions
Word Study Assessment: Roots, Prefixes, Suffixes, and Vocabulary

Quiz
•
8th Grade
17 questions
guess the logo

Quiz
•
8th Grade
16 questions
Function or Non-Function?

Quiz
•
8th - 10th Grade
15 questions
Sentence Fragments and Run-ons

Quiz
•
8th Grade