Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.69 KB | None | 0 0
  1. print("Hi, I'm Marvin, your personal bot.")
  2. print("Let's get started!")
  3. users_name =input("What's your name?")
  4. print("Welcome "+ users_name +" it's nice to meet you!")
  5. print("lets add some numbers")
  6. input1=input("Number 1 = ")
  7. input2=input("Number 2 = ")
  8. number1=int(input1)
  9. number2=int(input2)
  10. result = number1 + number2
  11. output = str(result)
  12. print(input1 + " + " + input2 + " = " +output)
  13. print("We now want to find the area of a triangle")
  14. height=input("How tall is your triangle?")
  15. base=input("What is the base of your triangle?")
  16. height_int=int(height)
  17. base_int=int(base)
  18. area_triangle=height_int*base_int/2
  19. area=str(area_triangle)
  20. print("The area of your triangle is " + area)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement