Skip to content

Course home

Programming fundamentals

Programming fundamentals

EasyMediumHard
123456789101112131415161718192021222324
Question 16

A cycle hire company offers two types of bikes:

  • A Standard bike costs £15 per day.
  • An Electric bike costs £25 per day.

Create a function, calculateRental(), that takes the number of days and the type of bike as parameters, then calculates and returns the total rental price to pay.

You do not have to validate these parameters.

You must use either:

  • OCR Exam Reference Language, or
  • a high-level programming language that you have studied.
[4]
Markscheme

Programming fundamentals Questions

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

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

Question bank