print("Welcome to",", Simple Calculator!")
TM=("Simple Calculator!")
while True:
M1=int(input("Enter Your first Value:"))
M2=int(input("Enter Your Second Value:"))
print("1.Addition")
print("2.Subtraction")
print("3.Multiplication")
print("4.Division")
check=int(input("choose your operation:"))
if(check==1):
result=M1+M2
print("your answer is =",result)
print("Thankyou for visiting",TM)
elif(check==2):
result=M1-M2
print("your answer is=",result)
print("Thankyou for visiting",TM)
elif(check==3):
result=M1*M2
print("your answer is=",result)
print("Thankyou for visiting",TM)
elif(check==4):
if(M2==0):
print("We are sorry,It is not possible to Divide any Number by'0'")
else:
result=M1/M2
print("your answer is=",result)
print("Thank you for Visiting",TM)
else:
print("you entered the Wrong Value.")
Selection=input("Do you Want to Calculate Again? (Yes/No):").lower()
if Selection !="yes":
break
print("Thank you for calculating")
0 Comments