[Project #1] Simple Calculator

int1 = float(input("Enter first number: "))
operand = input("Enter operation: ")
int2 = float(input("Enter second number: "))

def add(int1, int2) :
x = int1
y = int2
sum = x + y
output = round(sum,3)
print (output)
def sub(int1, int2) :
x = int1
y = int2
difference = x - y
output = round(difference,3)
print (output)
def multiply(int1, int2) :
x = int1
y = int2
product = x*y
output = round(product,3)
print (output)
def divide(int1, int2) :
x = int1
y = int2
dividend = x/y
output = round(dividend,3)
print (output)
if operand == '+' :
add (int1, int2)
if operand == '-' :
sub (int1, int2)
if operand == '*' :
multiply (int1, int2)
if operand == '/' :
divide (int1, int2)

first time using python, let me know anything i can improve on, wasn't sure how to implement the ANS part

/r/PythonProjects2 Thread