Eddie C.

asked • 03/13/21

Python assistance

When you work on a peloton bike you burn 35 calories per mile.
# Write a program that uses a loop to display the number of calories burned after each mile (1, 3, 5, and 7).
# Pass in miles and return out the calories. (HINT -- FOR RANGE)
  1. Use at least two functions --- main() and calculation().
  2. All calculations should happen in the calculation function.
  3. The main function should be defined last. Remember to call the main function very last.
  4. Input and output should happen in the main function.
  5. Call and pass variables into the calculation function from within the main function, be sure to return the answer back to the main function into another variable.


1 Expert Answer

By:

Patrick B. answered • 03/13/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.