I came across an error with incaution when using the round() function: def get_discount_price(ori_price, discount): discount_price = ori_price * (1 - discount) # forget to return `discount_price` >>> round(get_discount_price(50, 0.2)) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-2-abb2b34126d0> in <module> ----> 1 round(get_discount_price(50, 0.
2022-11-20
Issues as well as problems encountered during Python development and their solutions.
2022-11-20