LAB: Step counter
A pedometer treats walking 1 step as walking 2.5 feet. Define a function named feet_to_steps that takes a float as a parameter, representing the number of feet walked, and returns an integer that represents the number of steps walked. Then, write a main program that reads the number of feet walked as an input, calls function feet_to_steps() with the input as an argument, and outputs the number of steps.
Use floating-point arithmetic to perform the conversion.
Ex: If the input is:
150.5
the output is:
60
The program must define and call the following function:
def feet_to_steps (user_feet)

Respuesta :

The program is an illustration of functions.

Functions are group of code blocks that perform as one

The feet_to_steps() function in python where comments are used to explain each line is as follows:

#This defines the feet_to_steps() function

def feet_to_steps(feet):

   #This calculates the number of steps

   steps = feet/2.5

   #This returns the number of steps

   return "Steps: "+str(int(steps))

#The main begins here

#This gets input for the number of feet

feet = float(input("Feet: "))

#This prints the number of steps from the feet_to_steps function

print(feet_to_steps(feet))

Read more about similar programs at:

https://brainly.com/question/25223400