defining function in python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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 Answers
+ 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