
Python Summer Internship Quiz-8

Quiz
•
Professional Development
•
Professional Development
•
Medium

Gnaneshwar Reddy
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a looping statement in Python?
A) for
B) while
C) loop
D) do-while
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many times will the following for loop iterate?
for i in range(5):
print(i)
A) 5 times
B) 4 times
C) Infinite times
D) 0 times
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
i = 1
while i < 5:
print(i)
i += 2
A) 1 2 3 4
B) 1 3
C) 1 2 4
D) 1 3 5 7
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement is used to terminate the current loop iteration and move to the next iteration in Python?
A) break
B) continue
C) pass
D) exit
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
for i in range(3):
for j in range(2):
print(i, j)
A) 0 0 1 0 2 0
B) 0 1 1 2 2 3
C) 0 0 0 1 1 0 1 1 2 0 2 1
D) 0 0 0 1 1 0 1 1 2 0 2 1
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the range(5) function represent in Python?
A) A list containing numbers from 0 to 4
B) A list containing numbers from 1 to 5
C) A generator function
D) An infinite loop
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements is true about the while loop in Python?
A) It executes a block of code a specified number of times.
B) It continues to execute a block of code as long as a condition is true.
C) It is used only for iterating through sequences.
D) It cannot be terminated manually.
Create a free account and access millions of resources
Similar Resources on Wayground
12 questions
Debugging & SDLC

Quiz
•
Professional Development
6 questions
Stoma & Wound Care

Quiz
•
Professional Development
10 questions
Python Functions

Quiz
•
Professional Development
11 questions
Python Libraries Series - Pandas

Quiz
•
Professional Development
10 questions
Day 5 - Data Type and Structur

Quiz
•
Professional Development
10 questions
Toric IOLs

Quiz
•
Professional Development
10 questions
Tecnis Eyhance

Quiz
•
Professional Development
15 questions
Quiz Strano

Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade