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.
nitrogenMass ← (phosphorusMass / 5) * 2
nitrogenMass ← phosphorusMass * 5
nitrogenMass ← (phosphorusMass / 2) * 3
nitrogenMass ← (phosphorusMass / 2) * 5
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.