您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

python三角形判定怎么做

2025/6/9 19:49:22发布18次查看
python三角形判定怎么做?下面给大家带来具体的例子:
相关推荐:《python视频教程》
例子:
a = int(input("the length of the side a = "))b = int(input("the length of the side b = "))c = int(input("the length of the side c = "))if a != b and b != c and a != c: print("this is scalene") #不规则三角形elif a == b and b == c: print("this is an equilateral") #等边三角形else: print("this is isosceles") #等腰三角形
结果如下:
the length of the side a = 3the length of the side b = 4the length of the side c = 5this is scalenethe length of the side a = 3the length of the side b = 3the length of the side c = 3this is an equilateralthe length of the side a = 3the length of the side b = 3the length of the side c = 4this is isosceles
以上就是python三角形判定怎么做的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product