Create a Sleep Tracker

Please write a Scratch program that compares a person’s sleep hours to recommended averages based on the person’s age.

Video description right here

The outline would go like this:
1. ask for their age.
2. ask how many hours of sleep they average per night.
3. compare the hours of sleep variable to the recommended hours of sleep (available below*).
4. give them information like this:
>they are getting enough sleep compared to the recommended amount for their age OR
>they are not getting enough sleep compared to the recommended amount for their age

Sample output – click to zoom in:

Video description right here

Helpful hints:
1. use a series of nested if/else blocks (one inside the other) to compare age variable.  Like this:
if age < 1
set minimum sleep to 12
else
if age <3
set minimum sleep to 11
else
…and keep going

2. use ONE if/else block to determine if the person is getting enough sleep for their age:
if hours of sleep > minimum sleep OR hours of sleep = average sleep
OUTPUT
else
OUTPUT

Sleep data:*
Under 1 years of age – minimum hours is 12
Under 2 years of age – minimum hours is 11
Under 3 years of age – minimum hours is 10
Under 12 years of age – minimum hours is 9
Under 18 years of age – minimum hours is 8
Over 18 – minimum hours is 7

*Source: https://www.mayoclinic.org/healthy-lifestyle/adult-health/expert-answers/how-many-hours-of-sleep-are-enough/faq-20057898