【发布时间】:2019-11-30 23:57:37
【问题描述】:
我正在尝试测试一个功能。它必须以 3 个数字 a、b 和 c 作为其参数,并返回一个布尔值,指示 a² = b²+c² 是否。
a = int(input("a:"))
b = int(input("b:"))
c = int(input("c:"))
def test_pythagore():
a**2 == b**2 + c**2
return test_pythagore `
我希望程序在不使用 print 的情况下将 true 或 false 作为布尔值返回。
【问题讨论】:
-
返回什么?