Kursusindhold
Conditional Statements in Python
Conditional Statements in Python
Challenge: Debugging and Improving a Hydration Reminder Code
Opgave
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
Var alt klart?
Tak for dine kommentarer!
Sektion 2. Kapitel 3
Challenge: Debugging and Improving a Hydration Reminder Code
Opgave
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
Var alt klart?
Tak for dine kommentarer!
Sektion 2. Kapitel 3