测试积点老人 发表于 2024-10-31 09:39:17

写一个 Python 函数,计算两个数的和?

回复可见
**** Hidden Message *****

你好浮戈 发表于 2024-11-1 09:25:09

def add_two_numbers(num1, num2):
    return num1 + num2

result = add_two_numbers(10, 5)
print(result)

kallinr 发表于 2024-11-1 09:31:49

def add_two_numbers(num1, num2):
    return num1 + num2

result = add_two_numbers(10, 5)
print(result)

oliver.tang 发表于 2024-11-1 10:01:19

sum += i

海海豚 发表于 2024-11-1 10:05:56

def add_two_numbers(num1, num2):
    return num1 + num2

result = add_two_numbers(10, 5)
print(result)

litingting0214 发表于 2024-11-1 10:28:09

def add_two_numbers(num1, num2):
    return num1 + num2

result = add_two_numbers(10, 5)
print(result)

jingzizx 发表于 2024-11-1 13:06:44

return num1 + num2
页: [1]
查看完整版本: 写一个 Python 函数,计算两个数的和?