Skip to content

Course home

Operators

Operators

EasyMedium
1234567
Question 3

A programmer has written a section of code to determine if a sports team qualifies for bonus points.

1  score = int(input("Enter team score: "))
2  has_foul = input("Did they commit a foul? (Y/N) ")
3  if score > 10 and has_foul == "N":
4      print("Bonus points awarded!")

Give the logical operator used in line 3 of this code.

[1]
Markscheme

Operators Questions

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

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

Question bank