Incorrect! When you do a smaller number % a larger number, the answer will always be the smaller number. When you do a number % the same number, the answer will always be 0.
5 and 95.3 and 0
Correct!
100 and 95.3 and 12
Incorrect! When you do a larger number % a smaller number, the answer will be the remainder of the larger number divided by the smaller number. When you do a number % the same number, the answer will always be 0.
95 and 100.5 and 0
Incorrect! When you do a larger number % a smaller number, the answer will be the remainder of the larger number divided by the smaller number. When you do a smaller number % a larger number, the answer will always be the smaller number.
5 and 100.5 and 1
Incorrect! When you do a smaller number % a larger number, the answer will always be the smaller number. When you do a number % the same number, the answer will always be 0.
Checkpoint5.18.3.
Q-3: What will be printed after calling divide(100, 95) and divide(5, 7) and divide(7, 5)? (Note: Ignore whitespaces.)
None will be outputted after printing and calling multiplication_one(5, 10). Nothing will be outputted after calling multiplication_two(5, 10).
Correct!
Nothing will be outputted after printing and calling multiplication_one(5, 10). None will be outputted after calling multiplication_two(5, 10).
Incorrect! None is printed when you print and call a function and there is no return statement in the function body. Nothing is outputted when you call a function that only has a return statement and you don't print the function call.
50 will be outputted after printing and calling multiplication_one(5, 10) and after calling multiplication_two(5, 10).
Incorrect! None is printed when you print and call a function and there is no return statement in the function body. Nothing is outputted when you call a function that only has a return statement and you don't print the function call.
None will be outputted after printing and calling multiplication_one(5, 10). 50 will be outputted after calling multiplication_two(5, 10).
Incorrect! Nothing is outputted when you call a function that only has a return statement and you don't print the function call.
50 will be outputted after printing and calling multiplication_one(5, 10). Nothing will be outputted after calling multiplication_two(5, 10).
Incorrect! None is printed when you print and call a function and there is no return statement in the function body.
Checkpoint5.18.5.
Q-5: What would be outputted after running the code below? (Note: Ignore whitespaces.)
Incorrect! When you print a function call (e.g., print(subtraction(new_add_answer, 200))) and the function prints an output (e.g., def subtraction(num1, num2): print(num1 - num2)), the output will be printed first due to the function call. Then, printing the function call will output None because the function does not have a return statement.
None
Incorrect! When you print a function call (e.g., print(subtraction(new_add_answer, 200))) and the function prints an output (e.g., def subtraction(num1, num2): print(num1 - num2)), the output will be printed first due to the function call. Then, printing the function call will output None because the function does not have a return statement.
-89
Incorrect! When you print a function call (e.g., print(subtraction(new_add_answer, 200))) and the function prints an output (e.g., def subtraction(num1, num2): print(num1 - num2)), the output will be printed first due to the function call. Then, printing the function call will output None because the function does not have a return statement.