Build an Employee Profile Validator - Step 19

Tell us what’s happening:

Error message states: Your code does not have employee_code set to the required value EMP-2024-SD. Assign employee_code that exact string before the print statement and try again.

The variable was set in step 18 and step 19 is just to print the four values, however I cannot get passed this error despite seeing the variable has been set.

Your code so far

email = 'alice.johnson@company.com'
print(f'Email: {email}')

at_position = email.find('@')
print(f'Position of @: {at_position}')

username = email[:at_position]
print(f'Username: {username}')

has_at = '@' in email
print(f'Has @ symbol: {has_at}')

has_com = '.com' in email
print(f'Has .com: {has_com}')

messy_name = '  sARaH dAVis  '
print(f"Original name: '{messy_name}'")

clean_name = messy_name.strip().title()
print(f"Cleaned name: '{clean_name}'")

messy_email = '  SARAH.DAVIS@COMPANY.COM  '
clean_email = messy_email.strip().lower()
print(f"Original email: '{messy_email}'")
print(f"Cleaned email: '{clean_email}'")

name_badge = clean_name.upper()
print(f'Name badge: {name_badge}')

at_pos = clean_email.find('@')
email_user = clean_email[:at_pos]

print(f'Email: {clean_email}')
print(f'Username: {email_user}')

display_name = email_user.replace('.', ' ').title()
print(f'Display name: {display_name}')

phone = '123-456-7890'
phone_clean = phone.replace('-', '')
print(f'Phone with dashes: {phone}')
print(f'Phone without dashes: {phone_clean}')

full_address = '123 Main Street, Springfield, IL'
address_parts = full_address.split(', ')
print(f'Address parts: {address_parts}')

rejoined = ' | '.join(address_parts)
print(f'Rejoined: {rejoined}')

employee_code = 'EMP-2024-SD'
starts_with_emp = employee_code.startswith('EMP')
ends_with_com = clean_email.endswith('.com')

# User Editable Region

# 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/152.0.0.0 Safari/537.36

Challenge Information:

Build an Employee Profile Validator - Step 19

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/workshop-employee-profile-validator/69e7766b93d27261775d1cf1.md at main · freeCodeCamp/freeCodeCamp · GitHub

Update: the error was misleading. I managed to get through step 19 but the issue was with a print statement not with the variable being assigned. All good now :slight_smile:

what step are you doing? the error message you are reporting does not seem to exist in step 19, all the hints start with “You should print”

where you using Socrates hints?

This is the hint I received FYI on step 19

It is not clear that the prints need to be separate statements, you are right