violin1
February 18, 2026, 6:48pm
1
Tell us what’s happening:
Error:
You should concatenate employee_age to the end of employee_info.
Code:
first_name = “John”
last_name = “Doe”
full_name = first_name + " " + last_name
address = “123 Main Street”
address += “, Apartment 4B”
employee_age = 28
employee_info = full_name + " is "
employee_info = employee_info + employee_age
Your code so far
# User Editable Region
first_name = "John"
last_name = "Doe"
full_name = first_name + " " + last_name
address = "123 Main Street"
address += ", Apartment 4B"
employee_age = 28
employee_info = full_name + " is "
employee_info = employee_info + employee_age
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36 Edg/145.0.0.0
Challenge Information:
Build an Employee Profile Generator - Step 9
Please Tell us what’s happening in your own words.
Learning to describe problems is hard, but it is an important part of learning how to code.
Also, the more you say, the more we can help!
violin1
February 18, 2026, 6:52pm
3
I am trying to join (concatenate) the variable employee_age to the end of the string employee_info. However, employee_info is a string and employee_age is an integer (the number 28). When I run the code, Python throws a TypeError. It’s telling me it doesn’t know how to ‘add’ a number to a sentence automatically. Even though the instructions told me this error would happen, the ‘Check Your Code’ button isn’t letting me pass to the next step, where I learn how to fix it.
I’ve tried both employee_info = employee_info + employee_age and employee_info += employee_age, but I’m still stuck on this screen."
Teller
February 18, 2026, 6:52pm
4
Welcome to the forum @violin1
Here is a comparison of the original code and your code.
The code in blue is the original code, the code in red is your code.
The code in magenta is the overlap.
You need to add the concatenation to the existing variable, do not assign to a new variable.
Happy coding
dhess
February 18, 2026, 6:52pm
5
Now try to concatenate employee_age to the end of your employee_info string.
Concatenate to the existing employee_info string.
violin1
February 18, 2026, 6:55pm
6
so like: employee_info += employee_age?
dhess
February 18, 2026, 6:56pm
7
Nope. Just concatenate the age to the end of this string:
As you did here, concatenating last_name to the end of full_name, on the same line
1 Like
violin1
February 18, 2026, 6:57pm
9
thank you! i tried your solution and it worked. I think the problem was that I did not put everything into one line.
1 Like
violin1
February 18, 2026, 6:58pm
10
Thank you! This helped me understand how this challenge works.
system
Closed
March 18, 2026, 6:58pm
11
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.