Kodewick
Start learning →
Basic←→0 / 100

Free delivery over 99

#011BasicConditionsNumbers3 min

The shop's rule: orders of 99 or more ship free; below 99, delivery adds 10. Write to_pay(total) to return what to pay altogether.

Examples
to_pay(120)→120
to_pay(50)→60
main.py
def to_pay(total):
    shipping = 10
    # your code here: 99 or more makes shipping 0

    return total + shipping
Ctrl + Enter runs too
Result

Run tries the examples. When they look right, Submit.