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
Picture related to cyber safety
Fantom [35]

Answer:

?????

Explanation:

4 0
3 years ago
Read 2 more answers
Should you ever force a CPU into<br>its socket?​
tatyana61 [14]

Answer:

no you should not force a cpu into its socket.

Explanation: on an intel platform the pins are on the motherboard, therefore if you force it in it will damage the pins on the motherboard, and on AMD the pins are on the cpu itself so you can damage the extremely fragile pins on it, you can not shock your cpu however like the other answer.

7 0
3 years ago
Which item is used for formatting in responsive web design?
taurus [48]

Answer:

3) Improving image quality

Explanation:

A responsive web design is a web design that makes website to be user friendly to website users. It enables the users to have an optimal and enjoyable experience when making use of websites.

A responsive web design is the basis on which websites are built. It makes websites interactive for users such that that find the websites easy to access, easy to read and very interactive.

Computer programs used for creating a responsive web design are:

a) JavaScript

b) Cascading Style Sheets e.t.c

The item used for formatting a responsive web design is Improving Image quality. This helps to make the website responsive for users.

3 0
3 years ago
Major innovation made from establishment of abacus to the development of fifth dev of computer generation
expeople1 [14]

<u>Explanation</u>:

The establishment of the Abacus brought about one of the first counting device (calculator). This device was a mechanized computer that supported numeric calculations. However<u>, the process was entirely manual and mechanized. </u>This innovation led to;

First-generation  of computers, although not entirely manually operated like Abacus, made use of vacuum tubes, were very big in size and could store only a small amount of information.

Second Generation of computers unlike the first generation that uses vacuum tubes, this one came with new technology; the use of transistors. The computers were smaller in size than vacuum tubes.

Third Generation  computers made use of IC (Integrated circuits) for the first time. Contained higher storage capacity and was more reliable than previous generations.

Fourth Generation computers became known as the personal computer generation. This generation brought the use of personal computers on a personal level as they use microprocessors, was easy to carry about, had larger storage capacity and faster speed of operations.

Fifth-generation of computers is known as the age of artificial intelligence. These computers were programmed with the ability to make decisions just like a human being would.

7 0
3 years ago
When you compile your program, the compiler identifies the logic errors and suggests how to correct them?
Rainbow [258]
Nope. You're on your own to find them and fix them. This why testing is so important, otherwise they won't show up until the customer finds them and that's embarrasing.
6 0
4 years ago
Other questions:
  • G=D+(A+C^2)*E/(D+B)^3 Rewrite the above formula in terms of doing concurrent processing using cobegin and coend to identify thos
    12·1 answer
  • You can double-click a window’s title bar to maximize the window. true false
    9·1 answer
  • You just read a restaurant review on the internet of the newest restaurant in town. The writer of the article said the food was
    15·1 answer
  • computer has a 32-bit instruction word broken into fields as follows: opcode, six bits; two register file address fields, five b
    11·1 answer
  • 30 POINTS! PLEASE ANSWER QUICK!!!
    12·1 answer
  • What is included on the HP PC Hardware Diagnostics 3-in-1 USB Key that allows you to recover systems that cannot boot?
    14·1 answer
  • Which model emphasizes the risk analysis phase of development
    12·1 answer
  • When machining rotors, what is the reason for setting the indexing collars to zero?
    9·1 answer
  • You are going to create an Arduino sketch where you have two push buttons, one piezo, one
    10·1 answer
  • What is a circular network.​
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!