← Back to Functions
Question 331
Count Up Inside A Function
Count Up Inside A Function
Complete count_up(limit: int) -> None so it prints every whole number from 1 up to and including the limit, one per line, using a while loop and the counter that is already set up; a limit of 0 or less prints nothing. The tests call the function and then print Done on its own line. Do NOT write a main block or any top-level test code; the tests construct the calls. Input: one line, an integer, which the tests read and pass to your function.
Expected Output:
1 2 3 4 Done
= newline. The output ends with a newline — print one after the last line.
Hints3 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.