Skip to content

Course home

Operators

Operators

EasyMedium
1234567
Question 1

Liam has written a program to monitor greenhouse climate conditions.

Study the code below:

1  temp = float(input("Enter temperature in Celsius: "))
2  humidity = float(input("Enter humidity percentage: "))
3
4  if temp > 30 and humidity > 80:
5      print("Warning: Dangerously high heat and humidity.")
6  elif temp > 35:
7      print("Warning: High heat.")
8  else:
9      print("Conditions are normal.")

Identify the line number where the code includes a logic operator.

[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