0
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())
4 Respostas
+ 3
That worked thanks. its the small detail stuff sometimes. ill try to pay closer attention.
+ 1
Oh ok that makes sense thank you
+ 1
humidity = int(input())
if humidity>=40 and humidity<60:
print("norm")
it will work 100% i garentee
0
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()