Log in
Sign up for FREE
arrow_back
Library
Python Loops Work Sheet
By Mickey Arnold
star
star
star
star
star
Share
share
Last updated about 2 years ago
5 questions
Add this activity
1
1
1
1
1
Question 1
1.
What is the output of code below?
for i in range(5):
print(i, end = " ")
Question 2
2.
What is the output of code below?
for x in range(3):
print("time", end = " ")
Question 3
3.
What is the output of code below?
j = 0
while j < 10:
j += 3
print(j)
Question 4
4.
What is the output of code below?
word = "september"
for let in word:
if let != "m":
print(let, end = " ")
else:
break
Question 5
5.
What is the output of code below? Use show your work box to show output.
x = 3
while x > 0:
y = 3
while y > 0:
print("-", end = " ")
y -= 1
x -= 1
print()
visibility
View drawing