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
Difference between entropy and enthalpy is
olchik [2.2K]

Answer:

Explanation:

Enthalpy is the measure of total heat present in the thermodynamic system where the pressure is constant. Entropy is the measure of disorder in a thermodynamic system.

3 0
3 years ago
What is a guardian node summary for theta staking tool
Diano4ka-milaya [45]

Answer: Theta Guardian

Explanation:

THETA is used to stake as a Validator or Guardian node, contributing to block production and the protocol governance of the Theta Network. By staking and running a node, users will earn a proportional amount of the new TFUEL generated. Relayers earn TFUEL for every video stream they relay to other users on the network.

3 0
2 years ago
Which type of worker would most likely be able to begin work after receiving a high school degree and completing an
makvit [3.9K]
I’m pretty sure it’s miner

“I’ll give you head I mean brainiest”
3 0
2 years ago
How is primary storage different from secondary storage? Select the TWO correct statements.
Zina [86]
Primary storage refers to the main storage of the computer or main memory which is the random access memory or RAM. Secondary storage, on the other hand, refers to the external storage devices used to store data on a long-term basis.
7 0
2 years ago
If you want to copy data from one cel to another cell that is several rows down in a worksheet, which method should you use?
bogdanovich [222]

copy and paste

so you can keep the data in the current cell and add it to other cells that you want that data in as well

5 0
3 years ago
Other questions:
  • What is the one common feature that ties together different social media technologies? All of the social media tools we use toda
    5·2 answers
  • Software development team leaders need blank skills to excel in directing their teams
    8·2 answers
  • 1.
    5·2 answers
  • A signal has a spectrum from 0 to 145 Hz, as shown below. It is sampled at a rate of 295 Hz. Find the region of the baseband spe
    5·2 answers
  • Visual imagery encoding relates to _____ encoding, in that a person is connecting the new information to previously existing inf
    11·1 answer
  • Plis is a unit test !!!!!!! HelP ASAP only 30 mins left, will mark as brainliest
    8·1 answer
  • The operating system provides a ____, which is the means with which you interact with the computer
    5·1 answer
  • A software development company wants to reorganize its office so that managers and the Computer Programmers they supervise can b
    13·2 answers
  • PLZZZ HELP!!!!!!!
    12·1 answer
  • 3. When code tracing, why is it important to iteratively test parts of the program?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!