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
T is important to remember to print the return address when printing an
expeople1 [14]
Shipping label? Ggggggggggggg
6 0
3 years ago
Nonverbal messages from the movie it​
RUDIKE [14]

Answer:

ya you say right

Explanation:

5 0
3 years ago
Read 2 more answers
Lionbridge theory test
marishachu [46]
What about it kidddddd
4 0
3 years ago
Read 2 more answers
Amy uses digital devices to listen to music and to watch movies. Which one of these is Mbps a measure of?
posledela

Answer:

Storage Size

Explanation:

the answer to which is better 8 Mbps or 2 MBps? Is 2 MBps (which is 16 Mbps). Using a less common, but more clear notation: which is better 8 Mbit/s or 2 MBps? Answer: 2 MBps, since that is 16 Mbit/s. (Marketing people use this confusion to their advantage if you're not sure which is intended, ask.)

Source http://cs.sru.edu/~mullins/cpsc100book/module02_introduction/module02-05_introduction.html

(if you want to read the full artical.)

8 0
2 years ago
____ is the security guarantee that people who intercept messages cannot read them. A. Availability B. Encryption C. Confidentia
Anni [7]

Answer:

C. Confidentiality

Explanation:

With confidentiality, a person who intercepts messages you intend to remain private cannot read them and thus increases your document protection

8 0
3 years ago
Other questions:
  • For wired network cards that get their IP addresses through DHCP, what can be set manually?
    5·1 answer
  • How could a system be designed to allow a choice of operating systems from which to boot? What would the bootstrap program need
    14·1 answer
  • 18. Using the same formatting elements and designs across slides in a presentation is important to develop?
    5·1 answer
  • How do you ask brainy a question without it not liking the question and saying it hurts their feelings?
    14·1 answer
  • If you're using the paintbrush tool and want to change the color of the paint being used what should you change
    6·1 answer
  • What is TLB for? Why TLB? Given the following number, what is theeffective memory access time?
    11·1 answer
  • What are TWO examples of soft skills?
    11·1 answer
  • Help help help help help help help help
    12·1 answer
  • Task 2
    6·1 answer
  • Your client Mr. Smith has requested a reservation at Eleven Madison Park this evening for a party of 2 at 6PM. Unfortunately, th
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!