where do i call userOutput() at? Where do I call printAnswer() at?
def main():

firstNumber = float(input('Enter your first number'))
secondNumber = float(input('Enter your second number'))

return firstNumber, secondNumber

def add(firstNumber ,secondNumber):
return firstNumber + secondNumber
def subtract(firstNumber , secondNumber):
return firstNumber - secondNumber
def multipy (firstNumber , secondNumber):
return firstNumber * secondNumber
def divide (firstNumber, secondNumber):
return firstNumber / secondNumber
def modulo (firstNumber , secondNumber):
return firstNumber % secondNumber
def exponent (firstNumber , secondNumber):
return firstNumber ** secondNumber



def userOutput(firstNumber, secondNumber,total,sub,mul,div,mod,exp):
print(firstNumber + secondNumber == total)
print(firstNumber - secondNumber == Sub)
print (firstNumber * secondNumber == mul)
print (firstNumber / secondNumber == div)
print (firstNumber % secondNumber == mod)
print (firstNumber ** secondNumber == exp)

total = add(firstNumber , secondNumber)
sub = subtract(firstNumber, secondNumber)
mul = multiply(firstNumber, secondNumber)
div = divide(firstNumber, secondNumber)
mod = modulo(firstNumber, secondNumber)
exp = exponent(firstNumber, secondNumber)



def printAnswer (anwserAdd, anwserSubtract,anwserMultiply,anwserdivide, anwserModulo,anwserExponent):
print (anwserAdd, anwserSubtract,anwserMultiply,anwserdivide, anwserModulo,anwserExponent)


# --------------------------------
# I've called main() for you.
# This line is a special way to call main
# that allows me to test your code. Do not change it!
if __name__ == '__main__':
main()

Answer :

Other Questions