6Easy
0/2

The Python program below is intended to calculate and print the compound growth multiplier of an investment portfolio over four quarters.

However, the program contains a logic error that prevents it from working as intended.

1  multipliers = [1.04, 0.97, 1.05, 1.03]
2  total_growth = 0
3  for m in multipliers:
4      total_growth = total_growth * m
5  print("The compound growth multiplier is: " + str(total_growth))

Identify the line number that contains the logic error, and write the corrected version of this line.

Your corrected line must be written in Python.

Logic Flowchart

[2]

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