Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Challenge: Debugging and Improving a Hydration Reminder Code | Mastering Python if-else Statements
Conditional Statements in Python
course content

Contenuti del Corso

Conditional Statements in Python

Conditional Statements in Python

1. Mastering Python if Statements
2. Mastering Python if-else Statements
3. Mastering Python if-elif-else Statements

book
Challenge: Debugging and Improving a Hydration Reminder Code

Compito

Swipe to start coding

Your task is to debug and improve the code using if-else statements to provide the correct feedback for the user.

  • Use an else statement when water_intake is less than daily_goal.
  • Ensure that the else statement does not include a condition, as it automatically covers all remaining cases.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 2. Capitolo 3
toggle bottom row

book
Challenge: Debugging and Improving a Hydration Reminder Code

Compito

Swipe to start coding

Your task is to debug and improve the code using if-else statements to provide the correct feedback for the user.

  • Use an else statement when water_intake is less than daily_goal.
  • Ensure that the else statement does not include a condition, as it automatically covers all remaining cases.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 2. Capitolo 3
Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Siamo spiacenti che qualcosa sia andato storto. Cosa è successo?
some-alt