목록2024/08/22 (2)
꼬물꼬물 개발자

# Return Valuse 1def tax_calc(money): return money * 0.35def pay_tax(tax): print("thank you for paying", tax)to_pay = tax_calc(150)pay_tax(to_pay)pay_tax(tax_calc(150))# Return Valuse 2 my_name = "gowoon"my_age = 42my_color_eyes = "brown"# f"{변수} + 문자열"print(f"Hello I'm {my_name}, I have {my_age} years in the earth, {my_color_eyes} is my eye color")# practicedef make_juice(fruit): return f"{f..

# Functionsdef say_hello(): print("hello how r u?")say_hello()# Indentationdef say_bye(): print("bye bye") say_hello()say_bye()# Parametersdef say_hello(user_name): # user_name = parameter print("hello", user_name, "how are you?")say_hello("gowoon") # gowoon = argument (data)say_hello("nico")say_hello("lynn")say_hello("ralph")# Multiple Parametersdef say_hello(user_name, user_age): print(..