Log in
Sign up for FREE
arrow_back
Library
Loops Quiz
By Mickey Arnold
star
star
star
star
star
Share
share
Last updated almost 2 years ago
5 questions
Add this activity
20
20
20
20
20
Question 1
1.
What is the output?
x = 0
for r in range( 3, 10 ):
x = x + r
print( x )
visibility
View drawing
Question 2
2.
What is the output?
i = 0
while i < 21:
i += 5
print(i)
visibility
View drawing
Question 3
3.
What is the output? You can type in the box.
m = 0
word = "school"
for let in word:
if m % 2 == 0:
print(let)
m += 1
visibility
View drawing
Question 4
4.
What is the output?
words = "computer programming"
b = 0
for let in words:
if let == "m":
b = b + 2
else:
b = b + 1
print(b)
visibility
View drawing
Question 5
5.
What is the output?You can type in the box.
x = 4
while x > 0:
y = 2
while y > 0:
print("#", end = " ")
y -= 1
x -= 1
print()
visibility
View drawing