Code:
while True:
class math():
def math_add(self, add):
self.add = add
def math_sub(self, sub):
self.sub = sub
def math_mul(self, mul):
self.mul = mul
def math_div(self, div):
self.div = div
a=int(raw_input("First Number: "))
b=int(raw_input("Second Number: "))
c=raw_input("Operation: ")
math = math()
math.math_add(a+b)
math.math_sub(a-b)
math.math_mul(a*b)
math.math_div(a/b)
if c=='+': print math.add
elif c=='-': print math.sub
elif c =='*': print math.mul
elif c =='/': print math.div
else: print "Please use +, -, *, or /"
Edit: A simpler way to this may actually be something like this:
Code:
class math():
def math_add(self,a,b):
self.add = a + b
math = math()
math.math_add(1,2)
print math.add