def xiaodi(): print("杀鸭") print("洗鸭") print("烧鸭") return "鸭" # 《计算机原理与概论》 盘子 = xiaodi() # 盘子 = "鸭" print(盘子) # 传入的参数的函数 def hello(a, b): c = a+b # 返回 return a,b,c # += 复合运算符 d = hello(1,2) print(d) 算法题 力扣:https://leetcode-cn.com/problemset/all/ 计算机的函数 告诉函数方程式“1+1” 返回计算的结果