+ 1

defining function in python

i have to define a function called report_grade(percent) that reports mastery if the grade is above 80. if the grade is above 80, say it’s mastery below 80 say it is not

28th Jan 2018, 1:31 AM
Nick DiPaolo
Nick DiPaolo - avatar
2 Réponses
+ 2
def report_grade(percent): if percent>80: print("Mastery") else: print("Not Mastery") report_grade(85) report_grade(72) report_grade(95) Output: Mastery Not Mastery Mastery
28th Jan 2018, 1:34 AM
LordHill
LordHill - avatar
+ 1
thank you so much
28th Jan 2018, 2:13 AM
Nick DiPaolo
Nick DiPaolo - avatar