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
