livepython.net

42. Python Program to Add Two Numbers Stored as Text

EasyNone & conversion

Overview

Convert text to numbers before adding.

Problem Statement

Store the text "15" in a and "27" in b. Convert them to whole numbers and print the sum like this:

15 + 27 = 42

Input

No input is required for this question.

Output

15 + 27 = 42

Learn this firstChapter 5 · Python None and Type Conversion (int, float, str)
solution.py
# write your code here

EXPECTED OUTPUT

115 + 27 = 42

YOUR OUTPUT

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