Desafio: Conselheiro do Tempo
Swipe to start coding
Você está desenvolvendo um aplicativo de clima que classifica a temperatura externa atual e fornece conselhos adequados com base na categoria de temperatura. Você possui uma variável temperature, que representa a temperatura externa atual em graus Celsius.
- Se
temperaturefor maior que30, atribua'Hot'aweather_status. - Se
temperatureestiver entre15e30(inclusive), atribua'Warm'aweather_status. - Se
temperatureestiver entre0e14(inclusive), atribua'Cool'aweather_status.
Com base no weather_status determinado, atribua o conselho adequado para atividades ao ar livre:
- Se
weather_statusfor'Hot', atribua'Stay hydrated'aoutdoor_advice. - Se
weather_statusfor'Warm'ou'Cool', atribua'Great weather for a walk'aoutdoor_advice. - Caso contrário (
weather_statusfor'Cold'), atribua'Wear a coat'aoutdoor_advice.
Solução
Obrigado pelo seu feedback!
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Incrível!
Completion taxa melhorada para 9.09
Desafio: Conselheiro do Tempo
Deslize para mostrar o menu
Swipe to start coding
Você está desenvolvendo um aplicativo de clima que classifica a temperatura externa atual e fornece conselhos adequados com base na categoria de temperatura. Você possui uma variável temperature, que representa a temperatura externa atual em graus Celsius.
- Se
temperaturefor maior que30, atribua'Hot'aweather_status. - Se
temperatureestiver entre15e30(inclusive), atribua'Warm'aweather_status. - Se
temperatureestiver entre0e14(inclusive), atribua'Cool'aweather_status.
Com base no weather_status determinado, atribua o conselho adequado para atividades ao ar livre:
- Se
weather_statusfor'Hot', atribua'Stay hydrated'aoutdoor_advice. - Se
weather_statusfor'Warm'ou'Cool', atribua'Great weather for a walk'aoutdoor_advice. - Caso contrário (
weather_statusfor'Cold'), atribua'Wear a coat'aoutdoor_advice.
Solução
Obrigado pelo seu feedback!
single