Question
Q. Consider the code below and answer the questions that follow:
def multiply(number1, number2):
answer = number1 * number2
return(answer)
print(number, 'times', number2, '=', answer)
output = multiply(5,5)
(i) When the code above is executed, what gets printed?
(ii) What is variable output equal to after the code is executed?
(Please give reasons for your answer.)
Q. Consider the code below and answer the questions that follow:
def multiply(number1, number2):
answer = number1 * number2
return(answer)
print(number, 'times', number2, '=', answer)
output = multiply(5,5)
(i) When the code above is executed, what gets printed?
(ii) What is variable output equal to after the code is executed?
(Please give reasons for your answer.)
Sign Up to score 💯 in class 12 computer science
Related Questions
No related questions.