+ 2
Boolean logic
humidity = int(input()) if humidity > = 40 and humidity<=60: print("norm") Please help ⊠It says syntax error
2 Answers
+ 6
You have three mistakes
1. Remove space after >
2. Remove extra space after 40
3. Don't use enter for second condition.
Below is the correct code you can run
humidity = int(input())
if humidity >= 40 and humidity<=60:
print("norm")
+ 1
You can also use it like this:
if 40 <= humidity <= 60:
...