0

Hello guys I am trying to compare many results then grade each courses without repeating myself all over.Trying to obey dry rule

chm201=input('chm 201 score: ') chm203=input('chm 203 score: ') chm212=input('chm 212 score: ')

14th Jul 2020, 6:38 PM
Ajisegiri Sunday
Ajisegiri Sunday - avatar
2 odpowiedzi
+ 1
Please put all of them in a code so we can know how to help you shorten it.🙏🙏 what do you want to do with the input?
14th Jul 2020, 7:22 PM
Tomiwa Joseph
Tomiwa Joseph - avatar
0
OK something like this def chemical_sciences(matric_number): name=input('Enter student name: ') def grading(): chm201=int(input('chm 201 score: ')) chm203=int(input('chm 203 score: ')) chm212=int(input('chm 212 score: ')) if chm201>=95: print('chm201 ==>Grade: A') elif chm203>=95: print('chm203 ==> Grade: A')
14th Jul 2020, 9:23 PM
Ajisegiri Sunday
Ajisegiri Sunday - avatar