Build an Employee Profile Validator - Step 7

Tell us what’s happening:

Showing correct in the terminal, but saying "You should assign ’ sARaH dAVis ’ to messy_name. I already have it assigned to it and I’ve checked the string for any mistakes and I can’t find any.

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}')

# User Editable Region
messy_name ="'  sARaH dAVis  '"
print(f"Original name: {messy_name}")
# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:157.0) Gecko/20100101 Firefox/157.0

Challenge Information:

Build an Employee Profile Validator - Step 7

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

Nevermind, I figured it out with the help of Socrates. If anyone else is struggling with this step in a similar way, the answer is much dumber than you could ever imagine.

You can get the correct output in a different way, but it’s not THEIR way, so they won’t let you pass.

I think the wording of the prompt needs to be made more clear so that future learners understand EXACTLY how FreeCodeCamp wants the code written.

Create a variable messy_name and assign it the string sARaH dAVis with two leading spaces and two trailing spaces.

here it does not mention quotes at all

but if you want to propose a change to this step you can do so by creating a github issue

this is the answer it’s actually dumb

code removed by moderator

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge. How to Help Someone with Their Code Using the Socratic Method

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

I tried the solution but it did not worked. But this worked instead for me

code removed by moderator

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge. How to Help Someone with Their Code Using the Socratic Method

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

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

Thats my code so far but it won’t let me move on because the quotation marks aren’t there. Can anyone help me figure out how to put them in?

Welcome to the forum @gorneyjo,

Please create your own topic when you have specific questions about your own challenge code. Only respond to another thread when you want to provide help to the original poster of the other thread or have follow up questions concerning other replies given to the original poster.

The easiest way to create a topic for help with your own solution is to click the Help button image located on each challenge. This will automatically import your code in a readable format and pull in the challenge URL while still allowing you to ask any question about the challenge or your code.

Thank you.