Build an Employee Profile Generator - Step 14

Tell us what’s happening:

recently started learning coding and im really confused on this what have i typed wrong? i keep getting this error “Your code raised an error before any tests could run. Please fix it and try again”

Your code so far

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 ' + str(employee_age) + ' years old'
print(employee_info)
experience_years = 5
experience_info = 'Experience: ' + str(experience_years) + ' years'
print(experience_info)

# User Editable Region

employee_card = f"Employee: [John Doe] | Age: [28]


# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36

Challenge Information:

Build an Employee Profile Generator - Step 14

You didn’t close your f-string, and please use variables in your f-string, not the values assigned to them.

i did that and now its saying “You should update employee_card to use the f-string f'Employee: {full_name} | Age: {employee_age}'.” my brain is officially fried

Please post your updated code.

Tell us what’s happening:

fixed it and still i am having problems…?

Your code so far

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 ' + str(employee_age) + ' years old'
print(employee_info)
experience_years = 5
experience_info = 'Experience: ' + str(experience_years) + ' years'
print(experience_info)

# User Editable Region

employee_card = f"Employee: [John Doe] | Age: [28]"

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36

Challenge Information:

Build an Employee Profile Generator - Step 14

Please don’t create duplicate topics for the same challenge/step. I have merged your recent post into this existing topic.

my bad i did not know

You are still not using the variable names in your f-string.

this is so confusing. Alr ill fix it

alr i fixed it this is what my code looks like now “employee_card = f"Employee: {John Doe} | Age: {28}” and im still getting errors

Can you say what are the variable names in this code?

uhhh first_name, last_name, and uhhhhhh 28..? sorry i like started this last week so im really new</3

wait no…i got it mixed up

its employee_age and full_name i think

That’s okay. Learning new things is hard.

Here’s an easier example: first_name = 'John'

In this code, first_name is the variable and ‘John’ is the value we are storing in that variable.

Can you try again to say what are the variables you need to use in your f-string?

im pretty sure its employee_card is the variable

This is correct.

employee_card is the variable you are assigning the f-string to.

alr i understand that now but im still getting an error and i dont know what im doing wrong and i have everything correct i think? “employee_card = f"Employee: [John Doe] | Age: [28]”

If you have an error message please share the complete text of the message.

Error messages are extremely useful and often contain the precise information that you need to resolve a problem. What do you think the error message tells you about your code?

those are still not variables inside your f-string, please use the variables employee_name and employee_age, not their values