Advertisement
Charlie_CR

new bot

Jan 23rd, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.95 KB | None | 0 0
  1. print("Hello & Welcome to Arithmetic World")
  2. print("I am a bot and help you to do different operations")
  3. users_name = input("What is you name? ")
  4. print("Welcome user " + users_name)
  5. print("let's add three numbers together")
  6. input1 = input("Number1 > ")
  7. input2 = input("Number2 > ")
  8. input3 = input("Number3 > ")
  9. number1 = int(input1)
  10. number2 = int(input2)
  11. number3 = int(input3)
  12. result = number1 + number2 + number3
  13. output = str(result)
  14. print(input1 + "+" + input2 + "+" +input3 +"=" + output)
  15. print("Now let's sustract numbers")
  16. input4=input("Enter Number4 > ")
  17. input5=input("Enter Number5 > ")
  18. number4=int(input4)
  19. number5=int(input5)
  20. result=number4 - number5
  21. output=str(result)
  22. print(input4 + "-" +input5+ "=" +output)
  23. print("Now let's calculate the area of a square")
  24. input6=input("side of the square > ")
  25. side_of_the_square=int(input6)
  26. result=side_of_the_square * side_of_the_square
  27. output=str(result)
  28. print(input6+ "*" +input6+ "=" + output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement