HELP ME TO SOLVE THIS problem USING FUNCTION
A teacher in a school wants to find and display the grade of a student based on his/her percentage score. The criterion for grades is as given below:
Score (both inclusive) Grade
Between 80 and 100 A
Between 73 and 79 B
Between 65 and 72 C
Between 0 and 64 D
Any other value Z
Assume that a percentage score is a whole number.
AND I HAVE WRITTEN THIS, BUT ITS NOT RETURNING ANY VALUE
MY CODE IS LIKE THIS
A teacher in a school wants to find and display the grade of a student based on his/her percentage score. The criterion for grades is as given below:
Score (both inclusive) Grade
Between 80 and 100 A
Between 73 and 79 B
Between 65 and 72 C
Between 0 and 64 D
Any other value Z
Assume that a percentage score is a whole number.
AND I HAVE WRITTEN THIS, BUT ITS NOT RETURNING ANY VALUE
MY CODE IS LIKE THIS
num=0 num=input('enter your score=') #Start writing your code here def score(num): if num>=80 or num<=100: n='A' elif num>=73 or num<=79: n='B' elif num>=65 or num<=72: n='c' elif num>=0 or num<=64: n='d' else: n='e' return n num=input('enter your score=') print(score)