1. BeFOR We Begin error message 'Adam'


Hi all,
i wrote some code below, but when i saved & submitted the answer it gave me an error message. I don't understand what i did wrong. Can someone help me in the right direction?
Below this line, add a link to the EXACT exercise that you are stuck at.

In what way does your code behave incorrectly? Include ALL error messages.
Oops, try again. It looks like your code did not print "Adam".

What do you expect to happen instead?
I expected that i could continue with the next assignment.

names = ["Adam","Alex","Mariah","Martine","Columbus"]
for x in names:
    print names


If you look at what you printed, does that match your expectation of what should happen?
What do the instructions suggest should happen?


ionatan i got it.. thank you:) i looked at it again and saw that i printed the list instead of just the names in the list.. so changed the code (print names to print x) and it worked.Simple mistake but that's why i'm here, to learn. i appreciate your help!


Oh, no need to defend yourself - lots of new things makes it difficult to tell what you can be sure of and reason about. Your plan for what's supposed to happen is usually where you'll want to start debugging - comparing it to specifications and results, arguing for why something would or wouldn't happen.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.