Challenge: Weather-Based Outfit Recommender
Task
Swipe to start coding
Write a program that suggests the user what to wear based on the weather conditions.
Use if-statements to check the weather and display an outfit recommendation:
- If the weather is
"sunny"
, print:"Wear sunglasses and a t-shirt!"
. - If the weather is
"rainy"
, print: ``"Take an umbrella and wear a raincoat!". - If the weather is
"cold"
, print:"Wear a warm jacket and a scarf!"
.
Note
Use the strict checks in the boolean expression.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 3. ChapterΒ 4