Skip to content

Course home

Representing algorithms

Representing algorithms

EasyMediumHard
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
Question 99

A commercial fertilizer mixture requires 5 kg of nitrogen and 3 kg of potassium for every 2 kg of phosphorus used.

An algorithm calculates the required mass of nitrogen based on the mass of phosphorus entered by the user. The first line of the algorithm is:

phosphorusMass ← USERINPUT

Choose the line of code that correctly calculates the mass of nitrogen needed.

A

nitrogenMass ← (phosphorusMass / 5) * 2

B

nitrogenMass ← phosphorusMass * 5

C

nitrogenMass ← (phosphorusMass / 2) * 3

D

nitrogenMass ← (phosphorusMass / 2) * 5

Markscheme

Representing algorithms Questions

  1. GCSE
  2. /Computer Science
  3. /Representing algorithms

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

Question bank