79.5k views
4 votes
Write a loop to print 56 to 70 inclusive (this means it should include both the 56 and 70). The output should all be written out on the same line.

Sample run:
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70

2 Answers

3 votes

Answer:

for n in range(56,71):

print(n, end=" ")

Step-by-step explanation:

User Ageis
by
4.2k points
5 votes

In python:

for i in range(56, 71):

print(i, end=" ")

User Vincenza
by
4.7k points