Ann learned from a health TV program that it's ideal to sleep a minimum of A hours daily but not to exceed B hours. Ann currently sleeps for H hours each day and wants to know, whether her sleep schedule is healthy. Your program should receive 3 numbers in the following order: A, B, H, where A is always less than or equal to B. If Ann follows the program's recommendations, print "Normal". If she sleeps less than A hours, output "Deficiency", and if she sleeps more than B hours, output "Excess". Ensure the output exactly matches the specified cases ("Deficiency," "Excess," "Normal"). Pay attention to strict conditional operators: and , and . Think carefully about all the conditions which you need to use.
Healthy sleep
Report a typo
Sample Input 1:
6
10
8Sample Output 1:
NormalSample Input 2:
7
9
10Sample Output 2:
ExcessSample Input 3:
7
9
2Sample Output 3:
DeficiencyWrite a program in Python 3
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.