Truthy and Falsy in Python
Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.
The problem
- easy
- Pro
A function checks whether a discount was given with a simple if on the value, and it wrongly treats a discount of zero as missing. Explain truthiness in Python and how to write the check correctly.
Talk this problem through with an AI coach
This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.