8Hard
0/8

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]

Programming concepts Questions

Practise AQA GCSE Computer Science Programming concepts with exam-style questions for GCSE Computer Science. 100 questions, matched to the AQA GCSE Computer Science (8525) specification and written in Paper 1 and Paper 2 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.

PreviousNext

Programming concepts Questions

  1. GCSE
  2. /Computer Science
  3. /Programming concepts