Skip to content
MathsGenie logo
Open app

Course home

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

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]

Operators Questions

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