I am fairly new to programming and recently started working with dictionaries and a problem I am trying asks for me to create a list of names to take a poll. 2 names must not be in the dictionary while 2 more are in it. The code:
favorite_languages = {
'jen': 'python',
'sarah': 'c',
'edward': 'ruby',
'phil': 'python'
}
people = {'ryker', 'trey', 'jen', 'edward'}
for keys in favorite_languages:
if people in favorite_languages:
print(f"Thanks for taking our poll {people}")
if people in favorite_languages:
, what do you intend for that to do? Where it saysfor keys in favorite_languages:
, what do you expect will be the value ofkeys
each time through the loop?