on line 10 you want to iterate over the list peoples, not over the keys of the dict.
peoples = ['jen', 'sarah', 'edward', 'phil', 'jeff', 'cara', 'ben', 'adam', 'larry'] favorite_languages = { 'jen' : 'python', 'sarah' : 'c', 'edward' : 'ruby', 'phil' : 'python', 'jeff' : 'python', 'cara' : 'none', } for person in peoples: if person in favorite_languages: print("Thanks {} for taking the survey.".format(person.title())) else: print("{}, Please take the survey.".format(person.title()))
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs