python如何实现三角形判定-创新互联

这篇文章主要介绍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 = 3
The length of the side b = 4
The length of the side c = 5
This is Scalene
The length of the side a = 3
The length of the side b = 3
The length of the side c = 3
This is an Equilateral
The length of the side a = 3
The length of the side b = 3
The length of the side c = 4
This is Isosceles

以上是python如何实现三角形判定的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注创新互联行业资讯频道!

本文标题:python如何实现三角形判定-创新互联
文章分享:https://www.cdcxhl.com/article26/csjdjg.html

成都网站建设公司_创新互联,为您提供定制开发品牌网站建设全网营销推广企业网站制作建站公司网站排名

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

手机网站建设