None, the missing value
None is Python's value for "nothing here". A function that ends without return gives back None, and so does print.
def find_user(name):
if name == "ada":
return "Ada Lovelace"
user = find_user("bob")
if user is None:
print("not found")
result = print("hi")
print(result) # NoneThere is only one None object, so test for it with x is None and x is not None, not with ==.
The trap with or
x or default gives default whenever x is false. That covers None, but also 0, "" and [], which are often real answers:
count = 0
print(count or 10) # 10, wrong
if count is None:
count = 10
print(count) # 0, rightUse None to mean "not given" or "not found", and check it with is None. Then a zero, an empty string or an empty list stays what it is.
Your task
Write describe_score(score) returning "no score" when score is None and f"score: {score}" otherwise, where 0 is a real score. Write pick(value, default) returning default only when value is None, and value otherwise.
The explanation opens here once every check passes.