LearnPy Hub
← Exceptions problems
Easy

Adding Text and a Number

Read a word. Try word + 5; catch the TypeError and print Cannot add WORD and 5.

Input

One word.

Output

One line.

Sample 1

Input
hello
Output
Cannot add hello and 5

Sample 2

Input
10
Output
Cannot add 10 and 5
solution.py
Output appears here
Adding Text and a Number · Python practice problem · LearnPy Hub