Skip to content

Course home

Programming concepts

Programming concepts

EasyMediumHard
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
Question 42

Write a VB.Net program that calculates the hire charge for an electric scooter based on the user's account balance and the duration of the ride.

The program should:

  • Prompt the user to input their account balance (in pounds, e.g. 24.50).
  • Prompt the user to input the ride duration (as a whole number of minutes).
  • Calculate and output the hire charge based on these criteria:
    • If the duration is less than or equal to 10 minutes and the account balance is greater than 20, then the hire charge is 0.
    • If the duration is greater than 10 minutes, then the hire charge is the duration multiplied by 0.18 plus a flat booking fee of 1.20.
    • Otherwise, the hire charge is 1.50.

You should use meaningful variable names and correct VB.Net syntax in your answer.

[7]
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