Skip to content
MathsGenie logo
Open app

Course home

  1. GCSE
  2. Computer Science AQA
  3. Question bank

Programming concepts

EasyMediumHard
1234567891011121314151617181920212223
Question 20

Write a Python program that calculates the estimated active calories burned during a run lasting between 15 and 90 minutes.

Your program should:

  • keep asking the user to enter the run duration in minutes until they enter a value that is between 15 and 90 (inclusive)
  • calculate the baseline calories burned by multiplying the duration by 7.5
  • ask the user if the run was on an incline (expect the user to enter yes if it was)
  • if there was an incline, multiply the calculated baseline calories by 1.4
  • output the final estimated calories burned.

You should use meaningful variable name(s), correct syntax and indentation in your answer.

[8]

Programming concepts Questions

  1. GCSE
  2. /Computer Science
  3. /Programming concepts