infostudent1 = {'Student id': 1, 'name': 'Tom', 'age':18, 'sex': 'M'}
infostudent2 = {'Student id': 2, 'name': 'Mark', 'age':20, 'sex': 'M'}
infostudent3 = {'Student id': 3, 'name': 'William', 'age':22, 'sex': 'W'}
infostudent4 = {'Student id': 4, 'name': 'Jeph', 'age':19, 'sex': 'W'}
infostudent5 = {'Student id': 5, 'name': 'James', 'age':25, 'sex': 'M'}
infostudent6 = {'Student id': 6, 'name': 'Vincent', 'age':24, 'sex': 'W'}
Question (see photo) is to search the students that satisfy all the following conditions:
- Its ID bigger than 1 and smaller than 6
- Its age bigger than 19 and smaller than 26
- Its name include letter “M“

Aucun commentaire:
Enregistrer un commentaire