用户输入三条边长,若满足三角形条件则利用余弦定理计算出各条边所对应的夹角,若不满足则提示不符合,要求重新输入:
import math
while True:
a,b,c = eval(input('Please enter the three edge length of the triangle(Separate values by commas): '))
if(a+b>c
用户输入三条边长,若满足三角形条件则利用余弦定理计算出各条边所对应的夹角,若不满足则提示不符合,要求重新输入:
import math
while True:
a,b,c = eval(input('Please enter the three edge length of the triangle(Separate values by commas): '))
if(a+b>c