Sale (Dec. Usage) 2

Run Settings
LanguagePython
Language Version
Run Command
def dec(func): amount = 0 def wrapper(sales): nonlocal amount amount +=sales #amount = amount + sales func(amount) return wrapper @dec def producton(sales): print("total amount is:", sales) @dec def shipping(cost): print("total expense:", cost) #cost will substitute sales in dec() producton(10) shipping(20) producton(30) shipping(100)
Editor Settings
Theme
Key bindings
Full width
Lines