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 the words grieving, sigh, and blight affect the mood of "Spring and Fall"? A. They add a note of sorrow to the poem's hopeful mood. B. They bring a reali
5 animals that live in the ocean
Which device was first used in warfare during the Civil War, allowing for greater communication between generals and to members of press?
The belief that the will of most of the people will be just more often than it will be unjust is called _____.
an airplane takes off 12 and a half miles south of the city and flies due north at a constant speed of 180 miles per hour what is the plane's position relative
Help please I have to Asher as I did because it's the A
what do similar DNA and similar embryonic development suggest about organisms
The _______ is responsible for absorbing the most UV radiation. a. troposphere b. stratosphere c. mesosphere d. thermosphere
Members of the House of Representatives are elected for an unlimited number of six-year terms. an unlimited number of two-year terms. an unlimited number of fou
Buddhism is the main religion of India. A. True B. False