Skip to content

Course home

Programming concepts

Programming concepts

EasyMediumHard
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
Question 40

Write a Python program that calculates the estimated charging time in hours for an electric scooter with a battery capacity between 120 and 480 watt-hours (Wh).

Your program should:

  • Keep asking the user to enter a battery capacity in Wh until they enter a value that is between 120 and 480 (inclusive).
  • Calculate the base charging time in hours by dividing the battery capacity by 120.
  • Ask the user if they are using a fast charger (expecting the user to enter 'yes' if they are).
  • If they are using a fast charger, divide the base charging time by 2.
  • Output the final calculated charging time.

You should use meaningful variable names, correct syntax, and indentation in your answer.

[8]
Markscheme

Programming concepts Questions

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

298 exam-style questions on AQA GCSE Computer Science Programming concepts. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank