122k views
18 votes
Which program will have the output shown below?

12
13
14

>>> for count in range(12,14):
print(count)

>>> for count in range(15):
print(count)

>>> for count in range(12, 15):
print(count)

>>> for count in range(14):
print(count)

1 Answer

5 votes

Answer:

for count in range(12,15)

Step-by-step explanation:

This is a 'For' loop in python programming language and it take two or three arguments, the include: start, stop, step)

from the options given we only have two arguments (start, stop)

from my answer, the loop will begin from 12 and ends at (n-1) that's why it prints out 12, 13, and 14 only.

User Vitali Kaspler
by
4.5k points