Skip to content
MathsGenie logo
Quick links
Open app

Course home

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

Develop code

EasyMediumHard
123456789101112131415161718192021222324252627
Question 5

A programmer has written a Python program to calculate and display the average of two integer quiz scores entered by a user.

There are three errors in the code below.

Line 1: score1 = input("Enter score 1: ")
Line 2: score2 = input("Enter score 2: ")
Line 3: average = score1 + score2 / 2
Line 4: print("The average is " + average)

Identify the line number for each error and write the corrected line of code.

[3]

Develop code Questions

  1. IGCSE
  2. /Computer Science
  3. /Develop code