我是初学者python学习者。我创建了这个简单的程序,但不会显示任何错误消息,它也不起作用。输入后它停止工作。我究竟做错了什么?[Python 3.2]
import math
print('''
|.
| .
a| . c
| .
|________.
b
''')
def robot():
a = float(input('Enter side a, 0 for unknown \n: '))
b = float(input('Enter side b, 0 for unknown \n: '))
c = float(input('Enter hypotenuse c, 0 for unknown \n: '))
if a == 0:
print = ('a = ', (math.sqrt((c**2)-(b**2))))
if b == 0:
print = ('b = ', (math.sqrt((c**2)-(a**2))))
if c == 0:
print = ('a = ', (math.sqrt((a**2)+(b**2))))
input()
robot()
robot()
谢谢