Preskoči na glavni sadržaj
Prijava
Sign up for FREE
arrow_back
Biblioteka

Python Loops Work Sheet

star
star
star
star
star
Posljednje ažuriranje about 2 years ago
5
1
Pitanje 1
1.

What is the output of code below?

for i in range(5):

print(i, end = " ")

1
Pitanje 2
2.

What is the output of code below?

for x in range(3):

print("time", end = " ")

1
Pitanje 3
3.

What is the output of code below?

j = 0

while j < 10:

j += 3

print(j)

1
1
Pitanje 4
4.

What is the output of code below?

word = "september"

for let in word:

if let != "m":

print(let, end = " ")

else:

break

Pitanje 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()