Advertisement
adham-ahmed

Advanced Calculator in python

Apr 18th, 2022
877
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.04 KB | None | 0 0
  1. print("""Operations:
  2. Multiplication
  3. Subtract
  4. Add
  5. Divide.""")
  6. print("If you don't want to add any other number just set it to 1")
  7. print("For subtract set it to 0")
  8. print("The same thing with Add")
  9. print("If you dont want  to add anymore in divide set it to 1")
  10.  
  11.  
  12. Operation = input("What is the operation you want: ")
  13. Num1 = float(input("What is the first number: "))
  14. Num2 = float(input("What is the second number: "))
  15. Num3 = float(input("What is the third number: "))
  16. Num4 = float(input("What is the fourth number: "))
  17. Num5 = float(input("What is the fifth number: "))
  18. Num6 = float(input("What is the six number: "))
  19. if Operation == "Multiplication":
  20.     print("Result:", Num1 * Num2 * Num3 * Num4 * Num5 * Num6)
  21. elif Operation == "Subtract":
  22.     print("Result:", Num1 - Num2 - Num3 - Num4 - Num5 - Num6)
  23. elif Operation == "Add":
  24.     print("Result:", Num1 + Num2 + Num3 + Num4 + Num5 + Num6)
  25. elif Operation == "Divide":
  26.     print("Result:", Num1 / Num2 / Num3 / Num4 / Num5 / Num6)
  27. else:
  28.     print("Invaild operator! please try again.")
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement