Kursinnhold
Conditional Statements in Python
Conditional Statements in Python
Challenge: Debugging and Improving a Hydration Reminder Code
Oppgave
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 whenwater_intake
is less thandaily_goal
. - Ensure that the
else
statement does not include a condition, as it automatically covers all remaining cases.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 2. Kapittel 3
Challenge: Debugging and Improving a Hydration Reminder Code
Oppgave
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 whenwater_intake
is less thandaily_goal
. - Ensure that the
else
statement does not include a condition, as it automatically covers all remaining cases.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 2. Kapittel 3