How do you turn a plain English sentence into a working def — and why can the whole if/else collapse into a single returned Boolean?
Short drills on what this video just taught. Write the code, run the checks, and reveal the answer only if you are stuck.
Here is the English task: "Given a whole number, tell me whether it is even." Turn it into a function named is_even with a single parameter that returns True when the number is even and False otherwise. A short docstring is filled in for you.
Hint: % gives the remainder after division, and == tests equality and produces a Boolean.