CodeMIRAI
0 XP

Add two numbers

Easy +30 XP Solved

Read two whole numbers, each on its own line, and print their sum.

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

Input
3
4
Expected output
7
Input
10
-2
Expected output
8
Show a hint

Without int(), "3" + "4" joins the text and gives "34".

Show a solution
Python
Loading the editor…
Run the tests to check your solution.