LearnPy Hub
← Exceptions problems
Medium

Mixed Types

Read two values. If both are whole numbers, add them as numbers; otherwise join them as text. Detect the situation by attempting int() and catching the error.

Input

Two lines.

Output

One line.

Sample 1

Input
2
3
Output
5

Sample 2

Input
2
x
Output
2x
solution.py
Output appears here
Mixed Types · Python practice problem · LearnPy Hub