Boolean Logic 2 | Sololearn: Learn to code for FREE!


Boolean Logic 2

I am working on the problem referencing humidity. The Task: Complete the code to output "norm" if the taken percent of humidity is in the range of 40 and 60 inclusive. Don't output anything otherwise. My Code: humidity = int(input()) #your code goes here if humidity >= 40 or humidty < 60: print("norm") else: print())

9/10/2021 11:32:37 AM

Devin Robinson

4 Answers

New Answer


That worked thanks. its the small detail stuff sometimes. ill try to pay closer attention.


Hi Devin! When you're trying to connect to condition using logical operators you have to compare both integers. Range of 40 and 60 inclusive means 60 must be included [40,60]. So, your condition needs to be if humidity >=40 and humidity <=60: Here it is your working code. humidity = int(input()) #your code goes here if humidity >= 40 and humidty <= 60: print("norm") else: print()


Oh ok that makes sense thank you


humidity = int(input()) if humidity>=40 and humidity<60: print("norm") it will work 100% i garentee