- 1

boolean logic

The comfortable relative humidity for humans is between 40% and 60%. The given program takes the percent of humidity as input. 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. Sample Input 45 Sample Output norm

29th Dec 2021, 3:19 PM
Atul Diwan
6 ответов
+ 9
print("norm" if 60>int(input())>40 else "")
30th Dec 2021, 3:17 AM
Pallavi Bhardwaj
Pallavi Bhardwaj - avatar
+ 1
boolean logic The comfortable relative humidity for humans is between 40% and 60%. The given program takes the percent of humidity as input. 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. Sample Input 45 Sample Output norm else-statements print("norm" if 60>int(input())>40 else "")
17th May 2022, 2:56 AM
Najwan Najmussabah
+ 1
humidity = int(input()) #your code goes here if (humidity>=40 and humidity<=60): print("norm")
30th Aug 2022, 7:39 AM
kayvan kaynejad
kayvan kaynejad - avatar
0
humidity = int(input()) #your code goes here if (humidity>=40 and humidity<=60): print("norm")
15th Nov 2022, 11:36 AM
Pooja Patel
Pooja Patel - avatar
0
humidity = int(input()) #your code goes here if (humidity>=40 and humidity<=60): print("norm")
15th Nov 2022, 11:36 AM
Pooja Patel
Pooja Patel - avatar
0
humidity = int(input()) if 60>humidity and humidity>40: print("norm") else: print("") ^^ this is better
6th Dec 2022, 3:49 PM
Nick Henn
Nick Henn - avatar