1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Dimas [21]
3 years ago
14

A pedometer treats walking 2,000 steps as walking 1 mile. Write a program whose input is the number of steps, and whose output i

s the miles walked. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('{:.2f}'.format(your_value)) Ex: If the input is: 5345 the output is: 2.67 Your program must define and call the following function. The function should return the amount of miles walked. def steps_to_miles(user_steps)
Computers and Technology
1 answer:
Oksi-84 [34.3K]3 years ago
3 0

Answer:

Follows are the code to the given question:

def steps_to_miles(user_steps):#defining a method steps_to_miles that takes a variable user_steps

   return user_steps/2000#use return to calculate the steps

user_steps = int(input())#defining a variable user_steps that holds value from the user-end

print('%0.2f' % steps_to_miles(user_steps))#defining print that calls the steps_to_miles method

Output:

5345

2.67

Explanation:

In this code a method "steps_to_miles" that takes "user_steps" in the parameter inside the method a return keyword is used that calculates the user steps and return its values.

Outside the method, a "user_steps" variable is declared that inputs the value from the user-end pass into the method and prints its value.

You might be interested in
This is gonna be very long but I have no idea what to do, I'm confused.
kaheart [24]

for such experiment, you do it with care and to acquire and determine to put experience in it

Explanation:

because without you been or using experience the experiment will not correct

8 0
3 years ago
Match the order in which you should develop a plan:
Advocard [28]

Develop

Present

Approve

Brainliiest please?

4 0
3 years ago
How do I give Brainliest?? I'll give brainliest...
Elodia [21]
Can i have it don’t think i ever got one
8 0
2 years ago
Read 2 more answers
Do applications need to exchange udp control messages before exchanging data
Molodets [167]

The answer is NO.

Thats what makes UDP connectionless. Aclient that is going to send a UDP message to the server just sends it.The server does not know it is coming untill it arrives .When a server recieves a UDP message it gets the source address/port and the data.

7 0
3 years ago
Select the correct answer.
LiRa [457]

Answer:

E

Explanation:

The child and adult care food program should include all the information

regarding food menus with approximate cost, total meal counts, and attendance.

4 0
3 years ago
Other questions:
  • Select the correct answer.
    8·2 answers
  • A __________ is the column of data in a database that is used as the basis for arranging data.
    8·2 answers
  • A computer application such as Microsoft Access that is used to store data and convert it into information is a ________________
    6·1 answer
  • Write a program in java that reads each line in a file, reverses its characters, and writes the resulting line to another file
    15·1 answer
  • Fill in the blank: _________ is Google’s machine-learning artificial intelligence system that interprets people’s searches to fi
    9·1 answer
  • Suppose Host A sends Host B a TCP segment encapsulated in an IP datagram. When Host B receives the datagram, how does the networ
    11·1 answer
  • Clickable text or image that takes you to a different site
    15·1 answer
  • You are comparing cryptographic solutions to implement at your organization. Which two items should you focus on when you are ev
    12·1 answer
  • What would be used by a business to assess how the business is working within its organization goals? O A. Information systems B
    8·1 answer
  • Create a set of functions that compute the mean, median, and mode of a set of
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!