← Back to Functions
Question 319
Print What It Returns
Print What It Returns
cube(n: int) -> int is already written and returns the number multiplied by itself three times. Complete show_cube(n: int) -> None so it calls cube with its parameter and prints the value that comes back; the result only appears on screen if something prints it, because a return value by itself is silent. The driver reads one integer and calls show_cube; leave the driver as it is. Input: one line, an integer, no prompt. Output: the cube on one line.
Expected Output:
8= 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.