Skip to content

Course home

Develop code

Develop code

EasyMediumHard
1234567891011121314151617181920212223242526
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]
Markscheme

Develop code Questions

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

62 exam-style questions on Edexcel IGCSE Computer Science Develop code. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank