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

StackOverflow https://stackoverflow.com/questions/16313987

  •  13-04-2022
  •  | 
  •  

Question

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!

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top