170k views
5 votes
Question # 5

Fill in the Blank
Fill in the missing parts to produce the following output.

OUTPUT:
0
1
2
3

num in range(
):
print (num)

User Slimer
by
8.1k points

1 Answer

4 votes

for num in range(4):

print(num)

The output will be:

0

1

2

3

The for loop iterates through the numbers in the range function and prints those same numbers to the console.

User Tom Ashworth
by
8.5k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.