Python实验3选择结构程序设计2.pdfVIP

  • 8
  • 0
  • 约2.49千字
  • 约 2页
  • 2020-04-30 发布于安徽
  • 举报
实验 3 选择结构程序设计(续) 【实验目的 】 1.掌握分支条件语句的使用。 2 .掌握分支嵌套语句的使用。 【实验内容 】 1. 通过 Input ()函数任意输入三条边长,经过简单的计算后,判断三条边长能否构成三角 形,并确定是类型的三角形,如(等边,等腰,一般三角形)。 a=input(Please input the length of a:) b=input (Please input the length of b:) c=input(Please input the length of c:) if a+bc and a+cb and b+ca: if a==b==c: print This is an equilateral triangle. if a==b or a==c or b==c: print This is an isosceles triangle. if a!=b!=c: print This

文档评论(0)

1亿VIP精品文档

相关文档