American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

6PM- Python OOP- Joshua Widjanarko

April 3 @ 6:00 pm - 7:00 pm

Today We Did

  • looping through dictionary key, values, and items
  • printing it out
  • how to search if a “key” is inside the dictioanry

 

Homework

6-5. Rivers: Make a dictionary containing three major rivers and the country
each river runs through. One key-value pair might be ‘nile’: ‘egypt’.
• Use a loop to print a sentence about each river, such as The Nile runs
through Egypt.
• Use a loop to print the name of each river included in the dictionary.
• Use a loop to print the name of each country included in the dictionary.

favorite_languages = {‘jen’: ‘python’, ‘sarah’: ‘c’,’edward’: ‘rust’, ‘phil’: ‘python’,
}

6-6. Polling: Use the code in favorite_languages.py (page 96).
• Make a list of people who should take the favorite languages poll. Include
some names that are already in the dictionary and some that are not.
• Loop through the list of people who should take the poll. If they have
already taken the poll, print a message thanking them for responding.
If they have not yet taken the poll, print a message inviting them to take
the poll

Details

Date:
April 3
Time:
6:00 pm - 7:00 pm
Verified by MonsterInsights