5.5k views
0 votes
What does this loop that uses a range function do?

for i in range(7, 15)
print("goodbye")

O It prints "goodbye" 8 times, numbered from 7 through 14.
It prints "goodbye" 9 times, numbered from 7 through 15.
O It prints "goodbye" 9 times.
O It prints “goodbye" 8 times.

2 Answers

7 votes

Answer:

B. It prints "goodbye" 9 times, numbered from 7 through 15

Step-by-step explanation:

User Shpasta
by
5.3k points
4 votes

This code will print "goodbye" 8 times

User John Sensebe
by
4.4k points