150. Fix a TypeError in a Birthday Message
EasyExceptions
Overview
Read the error, find the line, and fix the cause.
Problem Statement
The program reads a name and an age, and should print a birthday message. But it crashes with:
TypeError: can only concatenate str (not "int") to str
Fix it, so that for Sunny and 13 it prints:
Happy birthday, Sunny! You are 13 today.
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: the name, then the age. Example:
Sunny
13
Output
The output for that example:
Happy birthday, Sunny! You are 13 today.
The tests try 3 different inputs.