I’m trying to return the second variable of my return statement from my function. I dont know if it works but its how our professor would like the statement to execute.
def check(number1, number2, operation, guess):
if operation == '+':
answer = number1 + number2
if answer == guess:
return True, answer
else:
return False, answer
How would I come out with the statements.
‘You answered correctly’ , if the statement Returns True
or
(‘The correct answer is’, answer)<-- the second half of the return statement.
So far what i get when i execute is (True, #) or (False,#) when i execute
print(check(number1, number2, operator, guess))