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

Loops Quiz

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

What is the output?

x = 0

for r in range( 3, 10 ):

x = x + r

print( x )

20
20
20
20
Pitanje 2
2.

What is the output?

i = 0

while i < 21:

i += 5

print(i)

Pitanje 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

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

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