Skip to content
MathsGenie logo
Open app

Course home

  1. IGCSE
  2. Computer Science Edexcel
  3. Question bank

Constructs

EasyMedium
1234567891011121314
Question 8

A programmer is writing a script to sum card values until the user decides to stop.

01 score = 0
02 active = True
03 while active == True:
04     user_input = input("Enter card value: ")
05     if user_input == "exit":
06         active = False
07     else:
08         score = score + int(user_input)
09 print("Final score:", score)

Identify the line number showing repetition.

[1]

Constructs Questions

  1. IGCSE
  2. /Computer Science
  3. /Constructs