
Python quiz 2
Authored by Gnaneshwar Reddy
Physical Ed
1st Grade
Used 12+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Microsoft
or continue with
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?