Challenge: Weather-Based Outfit Recommender
Compito
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.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 3. Capitolo 4