← Back to User Input
Question 155
Add Two Whole Numbers
Add Two Whole Numbers
Ask for two whole numbers with the prompts First number? and Second number? (each ends in a space), convert each with int(), and print their sum in the form Sum: <value>. Input: two lines, one integer each. Both prompts are part of the output, and since input() does not move to a new line, the two prompts and the sum all appear on one output line, as shown in Expected Output.
Expected Output:
First number? Second number? Sum: 12= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
User Input
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.