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
What is the foundational domain for business
mr Goodwill [35]

a fundamental domain or fundamental region is a subset of the space which contains exactly one point from each of these orbits . It serves as a geometric realisation for the abstract set of representatives of the orbits . There are many ways to choose a fundamental domain .

hope this help

7 0
3 years ago
A _______ is a collection of software routines that can be used by other software. Licensing terms for this type of software are
tensa zangetsu [6.8K]

Answer: library

Explanation:

A library refers to the collection of software routines that can be used by other software. Licensing terms for this type of software are important for programmers who use the software.

It is the collection of non-volatile resources that is used by computer programs, usually for the development of software.

8 0
3 years ago
a program p takes time proportional to log where nlogn is the input size. if the program takes 100 ms to process input of size 1
Eddi Din [679]

Answer:

The time is 4 \times 10^7 \ microseconds.

Explanation:

\ The \ requires \ time \ be \ t \ microseconds, \\\\\ \ formula: \\\\ time \propto \ nlog_n \Rightarrow \ time \ = \ knlogn \\\\

\ 10 \ = \ 100 \ log(100) \ \ \ \ \ \ \ \ \ k= 10^2 \ log\ ( \ 10^2\ ) \ k\\\\t=100,000,000 \log \ ( \ 100,000,000\ ) \ k = \ 10^8 \ log\ (\ 10^8\ )\ k \\\\\rightarrow \frac{t}{10} \ =\frac{10^8\ log \ (10^8)k}{10^2\ log\(10^2\ ) k} \\\\\rightarrow \frac{t}{10} \ =\frac{10^8\ log \ (10)\times 8 \times k}{10^2\ log\(10) \times 2 k} \\\\\rightarrow \frac{t}{10} \ =\ 4\times 10^6\\\\\rightarrow \ t \ =\ 4\times 10^6 \times 10 \\\\\rightarrow \ t \ =\ 4\times 10^7 \ microseconds \\\\

3 0
4 years ago
What is an electronic ledger that tracks mathematical data
anyanavicka [17]
Computer or calculater.hope this helps
7 0
3 years ago
What are some difficulties in synchronizing audio and video during telecine transfer? (Select all that apply.)
Oksi-84 [34.3K]
Telecine<span> is the process of </span>transferring<span> motion picture film into </span>video<span> and is performed in a color ... The most complex part of </span>telecine<span> is the </span>synchronization of the mechanical <span>film motion and the electronic video signal.</span><span> not noticed in the picture (but may be more noticeable </span>during<span> action speed. 

Telecine transfer can speed up the film, and Audio recordings are shorter than film. </span>
3 0
3 years ago
Other questions:
  • What must you specify the first time you save a new document? * 10 points a) file name b) file type c) file location d) all of t
    12·1 answer
  • Select the correct statement below about database services or database instances:
    5·1 answer
  • Someone plzzzzz help me!!!
    6·1 answer
  • Which of the following is not a property of a constructor?A. The name of a constructor can be chosen by the programmerB. A const
    11·1 answer
  • What are 6 steps to take to figure out what's wrong with your computer?
    5·1 answer
  • _____ is a method of computing that delivers secure, private, and reliable computing experiences based on sound business practic
    7·1 answer
  • This is really not a question but yall should texts me I need friends:))
    9·2 answers
  • Which devices are managed through device management? Device management is the process of managing----(blank)-----devices.
    15·1 answer
  • Authentication is a mechanism whereby unverified entities or supplicants who seek access to a resource provide a label by which
    12·1 answer
  • Please select the word from the list that best fits the definition Asking for review material for a test
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!