What will be the output of the following code?
for i in range (3):
print(i)
Code Sprint '25
Quiz
•
Engineering
•
University
•
Medium
Arknight 007
Used 6+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will be the output of the following code?
for i in range (3):
print(i)
0 1 2
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will be the output of the following code?
for j in range(5):
print(j * 2)
0 2 4 6 8
0 1 2 3 4
1 3 5 7 9
2 4 6 8 10
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will be the output of the following code?
for k in range(2, 5):
print(k ** 2)
2 3 4
2 3 4
4 9 16
1 4 9
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will be the output of the following code?
for m in range(1, 4):
print(m + 1)
1 2 3
2 3 4
0 1 2
2 3 4 5
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will be the output of the following code?
for n in range(1, 6):
print(n * 3)
3 4 5 6 7
1 2 3 4 5
0 3 6 9 12
3 6 9 12 15
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will be the output of the following code?
for x in range(4):
print(x + 2)
2 3 4 5
0 1 2 3
1 2 3 4
2 4 5 6
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will be the output of the following code?
for y in range(1, 4):
print(y ** 3)
1 4 9
1 8 27
1 2 3
1 3 5
20 questions
NEXUS'25
Quiz
•
University
15 questions
TRICODE CHALLENGE ROUND 1
Quiz
•
University
15 questions
TECH WHIZ
Quiz
•
University
23 questions
QUIZ
Quiz
•
University
20 questions
Java MCQ Test Day-2
Quiz
•
University
19 questions
AVINYA 2K25
Quiz
•
University
20 questions
Introduction to C++
Quiz
•
University
15 questions
Codigo
Quiz
•
University
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