Skip to content
Advertisement

Writing a loop with a step size 10, to print out all 2-digit numbers ending in 7 in increasing order in python

Write a program, using a for loop with step size 10, to print out all 2-digit numbers which end in 7, in increasing order

I have no idea where to start, or how to do this. help please!

Advertisement

Answer

range

range(stop)

range(start, stop[, step])

>>> for n in range(17, 100, 10):
        print n

        
17
27
37
47
57
67
77
87
97
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement