subject

5.9 LAB: User-Defined Functions: Step counter A pedometer treats walking 2,000 steps as walking 1 mile. Define a function named StepsToMiles that takes an integer as a parameter, representing the number of steps, and returns a float that represents the number of miles walked. Then, write a main program that reads the number of steps as an input, calls function StepsToMiles() with the input as an argument, and outputs the miles walked. Output the result with four digits after the decimal point, which can be achieved as follows: Put result to output with 4 decimal places If the input of the program is: 5345 the function returns and the output of the program is: 2.6725 Your program should define and call a function: Function StepsToMiles(integer userSteps) returns float numMiles

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 13:00
Which part of the cpu accepts data?
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
How to launch an app: steps to be successful? launching an app is a great idea, but it’s not that easy as we supposed to think. the majority of mobile applications don’t generate revenue because companies aren’t ready to be competitive. referring to our experience in successfully building and launching apps we hope to you omit these difficulties. we are going to talk about ideas, marketing, testing your product, its development, distribution and support. you will learn 8 product launch stages to succeed.
Answers: 1
question
Computers and Technology, 23.06.2019 20:00
What software programs are used to to create professional publication? a.) graphics programs b.) word processors c.) page layout programs d.) spreadsheet programs
Answers: 2
question
Computers and Technology, 24.06.2019 00:00
Visualizing a game of “tag” to remember the meaning of contagious
Answers: 3
You know the right answer?
5.9 LAB: User-Defined Functions: Step counter A pedometer treats walking 2,000 steps as walking 1 mi...
Questions
question
Mathematics, 15.07.2020 07:01
question
Mathematics, 15.07.2020 07:01
question
Mathematics, 15.07.2020 07:01
question
Mathematics, 15.07.2020 07:01
Questions on the website: 13722367