Write a Python program that will take N Student IDs from the user. [First, take N, then take N number of student IDs as input from the user.] Create a dictionary from the N IDs that will hold the IDs in separate keys based on the admitting semester.
Write a Python program that will take N Student IDs from the user. [First,
take N, then take N number of student IDs as input from the user.] Create a
dictionary from the N IDs that will hold the IDs in separate keys based on
the admitting semester.
Explanation: 3rd digit of the ID denotes semester.
1 = Spring
3 = Summer
2 = Fall
For example, 18101202 is from the Spring semester because the 3rd digit is
1.
================================================
Sample Input1:
5
18101202
18204354
20101457
19303372
20201999
Sample Output1:
{'Spring': ['18101202', '20101457'], 'Fall':
['18204354', '20201999'], 'Summer': ['19303372']}
================================================
Sample Input2:
4
18201202
18104354
20101457
19203372
Sample Output2:
{'Fall': ['18201202', '19203372'], 'Spring': ['18104354', '20101457']}
Step by step
Solved in 3 steps with 1 images