Find GPA through Function Program in Python

Find GPA through Function Program in 
Python


Code:

def GPA(marks):
    if(marks>=85):
        print("a")
    elif(marks<85 and marks>75):
        print("b")
    elif(marks<75 and marks>65):
        print("c")
    elif(marks<65 and marks>50):
        print("d")
    elif(marks==50 ):
        print("e")
    else:
        print("Fail")
GPA(int(input("please enter marks t calculate its Grade ")))






Output:


please enter marks t calculate its Grade 50
e
>>> 


Video Tutorial:




Post a Comment

Previous Post Next Post