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: ')
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?
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')