25 XP

2. Add two numbers

Beginner input math

Your program reads two lines of input. Each line holds one whole number (an integer), which can be negative or zero. Print the sum of the two numbers.

input() always gives you text, so turn each line into a number before adding.

Example 1

Input3 4
Output7
Explanation3 + 4 = 7.

Example 2

Input10 -2
Output8
Explanation10 + (-2) = 8.

Constraints

  • Each number is a whole number from -1,000,000,000 to 1,000,000,000.
  • Each line holds only the number, with no spaces around it.
  • Print nothing else. A prompt inside input() is fine: the tests leave it out of the output.

Submit also runs 3 more tests you can't see.

Practises User Input (lesson 6).

Code
# Read two whole numbers, each on its own line.
# Print their sum.