Advertisement
Guest User

triangles.py

a guest
Jul 21st, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.64 KB | None | 0 0
  1. print ("Hello! welcome to my first triangle project")
  2. print()
  3. #instrctions
  4. name=input("what is your name")
  5. print()
  6. print("lets start " + name)
  7.  
  8. l=int(input("enter the first lenght"))
  9. t=int(input("enter second length"))
  10. b=int(input("enter base"))
  11. a=int(input("enter angle"))
  12.  #equalateral
  13. if l ==t  and t==b and a!=90:
  14.     print("its an equalateral triangle with all angles equal thus haveing 60° each")
  15. if a==90:
  16.     print("its a right angle triangle")
  17.    
  18.  # scalene
  19. if l!=t and t!=b and a!=90:
  20.     print("its a scalene triangle with no sides equal.")
  21.  #issoceles    
  22. if l==t and t!=b and a==60 :
  23.     print("its an Issoceles triangle with 2 equal angles")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement