小白 求教希望有人指导一下有劳了 #为什么sum_2_num(50 ,20)不在print之前编写
def sum_2_num(num1, num2):result = num1 + num2
print("%d + %d + %d" % (num1, num2 ,result))#为什么sum_2_num(50 ,20)不在print之前编写
sum_2_num(50 ,20)
C:\Users\huawei\AppData\Local\Programs\Python\Python37\python.exe C:/Users/huawei/PycharmProjects/03_分支/练习2.py50 + 20 + 70Process finished with exit code 0
sum_2_num()是调用函数,print是函数里面的内容 Qnly_genius 发表于 2019-11-13 21:54
sum_2_num()是调用函数,print是函数里面的内容
谢谢 谢谢
页:
[1]