livepython.net

53. Python Program to Add Two Numbers from Input

EasyConvert input

Overview

Convert input to whole numbers before adding.

Problem Statement

Read two whole numbers, one per line, and print their sum. For example, for 2 and 3, print:

5

Use input() with no prompt text: the tests type the input for you, and a prompt would end up in your output.

Input

One value per line, in this order. Example:

2
3

Output

The output for that example:

5

The tests try 3 different inputs.

Learn this firstChapter 7 · Convert Input to Numbers with int() and float()
solution.py
# write your code here

EXPECTED OUTPUT

15

YOUR OUTPUT

Press Run to see your output here. Lines are compared with the expected output.