brookewallce4967 brookewallce4967
  • 13-01-2021
  • Computers and Technology
contestada

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.

Respuesta :

MrRoyal
MrRoyal MrRoyal
  • 18-01-2021

Answer:

The program in Python is as follows:

steps = int(input("Steps: "))

miles= steps/2000

print("Miles: "+str(miles))

Explanation:

This prompts the user for number of steps

steps = int(input("Steps: "))

This calculates the miles walked

miles= steps/2000

This prints the calculated miles

print("Miles: "+str(miles))

Answer Link

Otras preguntas

How do you write –514 11/12 as a decimal
The length of a rectangle is 2ft longer than it’s width. If the perimeter of the rectangle is 32 ft, find it’s area
Which expression is equivalent to 7(4x + 2y)? A) 42xy B) 28x + 2y C) 11x + 2y D) 28x + 14y
When heated, KClO3 decomposes into KCl and O2. 2KClO3⟶2KCl+3O2 If this reaction produced 17.4 g KCl, how many grams of O2 were produced? maSS
Question: 3 Which of the following is true about food contact surfaces?​
When must scientific theories be changed
A person can only give blood to someone with compatible blood antigens. If a person receives blood from someone with an incompatible blood type, it can cause a
The population of a city increased from 21,400 to 27,700 between 2007 and 2016. Find the change of population per year if we assume the change was constant from
What is biodiversity?why is biodiversity important for human lives?​
Do you believe that the spread of communism was a huge threat to American Democracy?