249,875 views
15 votes
15 votes
What are the missing parts to produce the following output?

0
2
4​


num in range(3):
print (num * )

User Occulus
by
2.6k points

1 Answer

21 votes
21 votes

Answer:

using while loop

num = 0

while num < 5:

print(num)

num += 2

or you can use for loop and range

for num in range(0, 5, 2):

print(num)

both will produce the output

0

2

4

User Kaydeen
by
3.2k points