Skip to content

Course home

Programming concepts

Programming concepts

EasyMediumHard
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
Question 1

A local club is fundraising to build a new community garden. Members of the community contribute different amounts until the fundraising target is met.

Write a program in Python or exam-style pseudocode that asks users to enter donations and tracks when the fundraising goal is reached.

The program should:

  • Get the user to enter the initial total fundraising goal.
  • Repeatedly get a donor to enter how much they are contributing towards the goal.
  • Subtract each donation from the remaining goal:
    • If the amount left to raise is more than 0, output how much is left to raise and repeat the process.
    • If the amount left to raise is exactly 0, output the message Target reached.
    • If the amount left to raise is less than 0, output the message Stretch goal fund is followed by the positive difference (how much they went over the target).

You should use meaningful variable names and correct syntax/structure 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