Skip to content

Course home

Programming concepts

Programming concepts

EasyMediumHard
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
Question 21

Write a C# program that calculates an estimate of the carbon footprint (in kg of CO2) for an automated delivery rover traveling a distance between 2 and 25 kilometres.

Your program should:

  • Keep asking the user to enter a travel distance in kilometres until they enter a value that is between 2 and 25 (inclusive).
  • Calculate the base carbon footprint by multiplying the entered distance by 0.35.
  • Ask the user if 'heavy payload' mode is enabled (expect the user to enter yes if it is).
  • If heavy payload mode is enabled, multiply the calculated carbon footprint by 1.6.
  • Output the final calculated carbon footprint in kg.

You should use meaningful variable names, correct syntax, and appropriate indentation in your answer.

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