18 Nov
18Nov

Source code -

# A simple program made by Linux & Windows Tech

name = input("Enter your name:")

print("Hi,",name)
print("Select operation:")

print("1. To find the sum of two numbers")

print("2. To find the difference of two numbers")

print("3. To find the product of two numbers")

print("4. To find the remainder of two numbers")

print("5. To find the average of two numbers")
choice = input("Enter the operation you want to use(1/2/3/4/5)")

num1 = int(input("Enter the first number:"))

num2 = int(input("Enter the second number:"))
if choice == '1': 

   sum = num1 + num2   

 print("The sum of those two numbers are:", sum)
elif choice == '2': 

   difference = num1 - num2   

 print("The difference of those two numbers are:", difference)
elif choice == '3': 

   product = num1 * num2  

  print("The product of those two numbers are:", product)
elif choice == '4': 

   remainder = num1 / num2    

print("The remainder of those two numbers are:", remainder)
elif choice == '5': 

   average = (num1+num2)/2   

 print("The average of those two numbers are:", average)
else: print("Invalid operation, try again!")
print("Thank you for using a simple program made by Linux & Windows Tech")

Comments
* The email will not be published on the website.
I BUILT MY SITE FOR FREE USING