A kindergarten in Berlin is organizing children into groups. The available group names are stored in a list:
groups = ['1A', '1B', '1C', '2A', '2B', '2C', '3A', '3B', '3C']Your task is to create a dictionary that represents the allocation of children to these groups. Here's what you need to do:
Read an integer input representing the number of groups to be filled.
Subsequent lines are the number of children in each group, listed in the same order as the groups list variable.
Create a dictionary where:
The keys are all the group names from the
groupslist.The values are:
The number of children for filled groups
Nonefor any groups that remain unfilled
Print the resulting dictionary.
Notes:
All nine groups should be included in the dictionary, even if they're not all filled.
The groups are filled in order, starting from '1A' and moving through the list.
If there are fewer filled groups than the total number of groups, the remaining groups should have a value of
None.