python - Regarding passing variables to an argument -
i working in python 2.7.8. i'm learning parameters , methods. i'm trying accomplish have user enter 2 different variables pass them argument within different methods, sum() , difference(). my following code this: def computesum(x, t): x = int(raw_input('please enter integer: ')) t = int(raw_input('please enter second integer: ')) x+t return sum def computedif(y, j): y = int(raw_input('please enter integer: ')) j = int(raw_input('please enter second integer: ')) y+j return dif def main(): raw_input('would find sum of 2 numbers or difference of 2 numbers?: ') answer = 'sum' while true: computesum() else: computedif() for reason compiler (pyscriptor) isn't running , cannot see output nor error messages, blank. can possibly me syntax/logic errors? there few problems code your indentation way off computesum , computedif expect 2 numbers parameters, ask them termin...