Write a program to enter students ' homework
1, check the student's work situation
2. Entry of students ' homework
3, can let enter 3 times, need to empty the case
Homeworks = {
' Zhang Flow ':
{' 2018.3.22': 'not delivered ', ' 2018.3.23':' Wei ' },
' Tianyu ': {' 2018.3.22': 'not delivered ', ' 2018.3.23':' Wei ' }
}
================================================================
Problems encountered in the middle:
1. When querying students ' assignments, print out the student's situation. Because the student's job is a dictionary type, it cannot be printed directly, and it needs to be converted to a string type before printing.
Print (name+ "job submission:" +str (Homeworks[name]))
2. When inputting student's work situation, need to insert the student's name and the homework situation to the dictionary, is a two-dimensional dictionary, uses in the way:
Homeworks[namec][date]=hwstat
The code is as follows:
Using Python to realize the small program of inputting student's work situation