answer.
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
Mashcka [7]
2 years ago
3

a pedometer treats walking 1 step as walking 2.5 feet. define a function named feet_to_steps that takes a float as a parameter,

representing the number of feet walked, and returns an integer that represents the number of steps walked. then, write a main program that reads the number of feet walked as an input, calls function feet_to_steps() with the input as an argument, and outputs the number of steps.
SAT
1 answer:
Allushta [10]2 years ago
6 0

The required program written in python 3 defines a function which converts the number of feets walked into steps and returns an integer value for the number of steps. The program goes thus :

def feet_to_steps(feet):

<em>#initialize</em><em> </em><em>a</em><em> </em><em>function</em><em> </em><em>called</em><em> </em><em>feet_to_steps</em><em> </em>

num_steps = feet / 2.5

<em>#divide</em><em> </em><em>the</em><em> </em><em>number</em><em> </em><em>of</em><em> </em><em>feets</em><em> </em><em>by</em><em> </em><em>2.5</em><em> </em><em>and</em><em> </em><em>assign</em><em> </em><em>the</em><em> </em><em>number</em><em> </em><em>of</em><em> </em><em>steps</em><em> </em><em>to</em><em> </em><em>the</em><em> </em><em>variable</em><em> </em><em>num_steps</em><em> </em>

return round(num_steps)

<em>#return</em><em> </em><em>the</em><em> </em><em>rounded</em><em> </em><em>integer</em><em> </em><em>value</em><em> </em><em>of</em><em> </em><em>num_steps</em><em> </em>

your_feet = eval(input('Enter feets number of feets walked : '))

<em>#prompts</em><em> </em><em>the user</em><em> </em><em>to</em><em> </em><em>input</em><em> </em><em>a</em><em> </em><em>float</em><em> </em><em>value</em><em> </em><em>for</em><em> </em><em>the</em><em> </em><em>number</em><em> </em><em>of</em><em> </em><em>feets</em><em> </em>

<em>#A</em><em> </em><em>sample</em><em> </em><em>run</em><em> </em><em>of</em><em> </em><em>the</em><em> </em><em>program</em><em> </em><em>is</em><em> </em><em>given</em><em> </em><em>below</em><em> </em><em>and</em><em> </em><em>attached</em><em>.</em><em> </em>

print(feet_to_steps(your_feet), ' steps')

Learn more :brainly.com/question/25097090

You might be interested in
A piece of land was purchased for $65,000. The value of the land has slowly been decreasing by 1% annually. How much will the la
Dennis_Churaev [7]

Então  em 20 anos a terra valeria R$13000

1%de 65000 é 650

650x20=  13000

6 0
2 years ago
Adolescence is associated with
TiliK225 [7]
Being unprepared, unadapted to the real world, young, naive, at least in my opinion
4 0
2 years ago
When deciding what to eat how much should we consider the workers who pick, process and transport it
GuDViN [60]

Answer:

Consider all workers and share cuz sharing is caring

5 0
2 years ago
You are a sales specialist at a company that makes copper wire. You use the formula (cost in dollars)= 0.09× (length in feet) to
liubo4ka [24]

rduxgfcjyrsuyxcfhgkftdryf

4 0
2 years ago
Read 2 more answers
Rivers that have developed over a long period of time are found in wide valleys with flat, low-lying bottoms. These valleys were
maw [93]

Answer:

A glaciation

Explanation:

i hope i help

5 0
2 years ago
Read 2 more answers
Other questions:
  • Leah is a professional photographer and is looking for a bank to open her personal and business checking, savings, and retiremen
    9·2 answers
  • To improve your chances of choosing correct answers on standardized tests you should apex
    12·2 answers
  • The expression 20L + 25G – 10 calculates the number of dollars that the ABC Lawn Company makes from mowing L lawns and raking G
    12·1 answer
  • "Rewards you for accomplishments" Which goal-setting step is described by this sentence?
    14·2 answers
  • It's often called the "City of Light." Paris buzzes with a special radiance day and night. Which choice most effectively combine
    5·1 answer
  • REASONING The design for a park is drawn on a coordinate graph. The perimeter of the park is modeled by the equation (x−3)2+(x−7
    9·1 answer
  • Earth’s outer core can be modeled by a spherical shell that extends from a distance of approximately 1,200 kilometers from Earth
    10·1 answer
  • Laura has rectangular piece of wood that is 8 inches by 3 inches. She wants to cover the top of the piece of wood with strips of
    5·1 answer
  • Choose six answers that are most similar? Freedom tender rhythm horse bread cabbage green tire goose asset
    6·2 answers
  • John takes out a loan for $ 12 , 000 at a simple interest rate of 4.5 % to be paid back in 36 monthly installments. What is the
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!