It is best to use a POGIL approach with the following. In POGIL students work in groups on activities and each member has an assigned role. For more information see https://cspogil.org/Home.
If you work in a group, have only one member of the group fill in the answers on this page. You will be able to share your answers with the group at the bottom of the page.
Some functions that work on lists return an iterator (an object that you can loop through the values of) which you can convert to a list of tuples using the list function. The range function also returns an iterator.
The zip function takes two lists and returns an iterator. You can convert this iterator to a list of tuples using the list function. Each tuple has an element from list1 and an element from list2 in order.
The better way to increment a count at a key is to use dict[key] = dict.get(key,0) + 1. This will avoid a key error if the key isnβt in the dictionary and the code is shorter.
If you worked in a group, you can copy the answers from this page to the other group members. Select the group members below and click the button to share the answers.
The Submit Group button will submit the answer for each each question on this page for each member of your group. It also logs you as the official group submitter.