
Python quiz 2

Quiz
•
Physical Ed
•
1st Grade
•
Medium

Gnaneshwar Reddy
Used 12+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Why do we need loops in programming?
For avoiding repeated code.
For iterations.
For traversals.
All are correct.
2.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
How do we differentiate the body of the loop from the rest of the code?
Writing loop above.
Using proper indentation.
All are correct.
3.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Which of the following is a loop in python?
While
Do-while
If-else
Foreach
4.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Which of the following creates iterable elements?
If-else
Range
Count
None of these.
5.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Find the count of even numbers in the output of the code given below?
# Code snippet starts
for i in range(23,102,25):
print(i, end = “-“)
print(“0″,end=” “)
2
1
3
6.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
What will be the output of the code given below?
# Code snippet starts
val = list(range(132,78,-12))
print(val)
# Code snippet ends
Range Error
[132, 120, 108, 96, 84]
Compilation error
None of these
7.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Find the output of the code given below?
# Code snippet starts
val = 500
while val>=230:
val = val*2//7
print(val)
# Code snippet ends
147
142
148
250
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
PE Weekly Quiz (Football)

Quiz
•
1st Grade
15 questions
P1 Personal hygiene quiz

Quiz
•
1st - 2nd Grade
20 questions
QUIZ - MAPEH 1

Quiz
•
1st Grade
20 questions
Normativa Bàsquet

Quiz
•
1st Grade - Professio...
20 questions
Boxing rules (final fight)

Quiz
•
1st - 12th Grade
15 questions
PE Elementary Review

Quiz
•
1st - 2nd Grade
15 questions
Olympics Quiz

Quiz
•
1st - 6th Grade
20 questions
ping pong

Quiz
•
1st - 3rd Grade
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade