59.4k views
3 votes
A pedometer treats walking 2,000 steps as walking 1 mile. Write a program whose input is the number of steps, and whose output is the miles walked. If the input is 5345, the output is 2.6725.

User Digil
by
5.3k points

1 Answer

3 votes

In python:

print(steps_walked / 2000)

User Dhairya Lakhera
by
5.2k points