← Back to Functions
Question 310
Print Or Return
Print Or Return
Two functions take the same two whole numbers. show_sum(a: int, b: int) -> None prints their sum and returns nothing; sum_back(a: int, b: int) -> int returns the sum without printing. The driver calls show_sum once, then stores what sum_back returns and prints double that value, so the output is two lines: the sum, then twice the sum. Input: two lines, each an integer, no prompts. Do not change the driver.
Expected Output:
7 14
= newline. The output ends with a newline — print one after the last line.
Hints2 available
Sign in to use hintsTopics:
Functions
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.