Exam grade

Exam grade

What grade did you get in your exam?

When students sit exams their total mark for a paper, called a raw mark is converted to a uniform mark scale (UMS). The UMS enables different units to be worth more or less than other units, or marked out of a different number of raw marks. Once all the UMS marks have been calculated, grade boundaries are decided to enable the results for each year to be similar to previous years. This balances one paper being harder than another.

Make


Write a program that outputs the grade achieved from a mark, and the number of marks needed to achieve the next grade using the data in the table below.

Use this boilerplate code as a starting point:

Success Criteria

Remember to add a comment before a subprogram or selection statement to explain its purpose.

Create a subprogram called `grade` that:

  1. Takes a parameter `mark` that is an integer.
  2. It returns the grade as outlined in the table:

Mark

<2

2

4

13

22

31

41

54

67

80+

Grade

U

1

2

3

4

5

6

7

8

9

Create a subprogram called `marks_needed` that:

  1. Takes a parameter `mark` that is an integer.
  2. Returns the number of marks needed to achieve the next grade as shown above.

Complete the `main program` so that:

  1. The user can input a mark.
  2. It outputs the grade achieved.
  3. It outputs the number of marks needed to achieve the next grade.

Typical inputs and outputs from the program would be:

Enter the mark 0-100: 50

A mark of 50 is grade 6

You needed 4 marks to achieve the next grade.


Enter the mark 0-100: 60

A mark of 60 is grade 7

You needed 7 marks to achieve the next grade.


Enter the mark 0-100: 80

A mark of 80 is grade 9

You needed 0 more marks to achieve the next grade.

Knowledge Organiser

Use these resources as a reference to help you meet the success criteria.

Programming guide:

Evaluate


Run the unit tests below to check that your program has met the success criteria.

Enter the mark 0-100: 0

A mark of 0 is grade U

You needed 2 more marks to achieve the next grade.

Enter the mark 0-100: 18

A mark of 18 is grade 3

You needed 4 more marks to achieve the next grade.

Enter the mark 0-100: 41

A mark of 41 is grade 6

You needed 13 more marks to achieve the next grade.

Enter the mark 0-100: 90

A mark of 90 is grade 9

You needed 0 more marks to achieve the next grade.

Check that you have:

  • Used comments within the code to describe the purpose of subprograms and conditions.
  • Used meaningful identifier names. That means the names of subprograms and variables indicate what they are for.

Registered in England and Wales: 10442992

VAT Number: 290 9845 58

Telephone: 01452 947500

Email: admin@craigndave.co.uk

Craig'n'Dave logo

Craig 'n' Dave

Bett Awards 2024 Finalist