Question: 5 . 3 9 LAB: Step counter Instructor note: This is almost identical to 5 . 5 for laps to miles. You will have a
LAB: Step counter
Instructor note:
This is almost identical to for laps to miles. You will have a function and then an if rame main : that gets the input, calls the function, and prints the returned value.
A pedometer treats walking step as walking feet. Define a function named feet tosteps that takes a float as a parameter, representing the number of feet walked, and returns the number of steps walked as an integer by using int Then, write a main program that reads the number of feet walked as an input, calls function feettosteps with the input as an argument, and outputs the number of steps returned from feet tosteps
Use floatingpoint arithmetic to perform the conversion.
Note: Converting a float to an integer may affect the result's accuracy.
Ex: If the input is:
the
The program must define and call the following function:
def feettostepsuserfeet
LAB
ACTIVITY
: LAB: Step counter
main.py
Load default template...
# Define your function here
if :
# Type your code here.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
