Advertisement
Guest User

BOT

a guest
Jan 28th, 2020
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. print("Hi! I am SPEA, your personal bot. ")
  2. print("NB:SPEA=square perimeter and area")
  3. userName = input("Can you tell me your name, please? ")
  4. print("Nice to meet you! " + userName)
  5. print("Let's calculate the area and perimeter of a square")
  6. input1 = input("Length>")
  7. input2 = input("Width>")
  8. item1 = int(input1)
  9. item2 = int(input2)
  10. result1 = item1 * item2
  11. result2 = (item1 * 2) + (item2 * 2)
  12. output1 = str(result1)
  13. output2 = str(result2)
  14. print("Area = " + input1 + " * " + input2 + " = " + output1)
  15. print("Area = " + output1 + "units squared")
  16. print("Perimeter = " + "2" + "*" + "(" + input1 + " + " + input2 + " )" + " =" + output2)
  17. print("Perimeter = " + output2 + "units")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement