← Back to User Input
Question 160
Age Next Year
Age Next Year
Ask for a name with Name? and an age with Age? (both prompts end in a space), convert the age with int(), and print <name> will be <age + 1> next year. Input: two lines, a name then a whole-number age. The prompts are part of the output and input() does not add a newline, so both prompts and the sentence appear on one line, as shown in Expected Output.
Expected Output:
Name? Age? Maya will be 20 next year.= 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.