Percentage Program in Python

Percentage Program in Python

Code:

a=str(input("please enter "))
while(a == "check"):
    marks=int(input("please enter marks "))
    percentage=marks*100/660
    if(percentage>=84):
        print("Grade is A")
    elif(percentage>=70 and percentage<=84):
        print("Grade is B")
    elif(percentage>=60 and percentage<=70):
        print("Grade is C")
    elif(percentage>=50 and percentage<=60):
        print("Grade is D")
    elif(percentage<50):
        print("student is Fail")
    a=str(input("please enter "))

Output:

please enter check
please enter marks 500
Grade is B
please enter check
please enter marks 300
student is Fail
please enter check
please enter marks 123
student is Fail
please enter s
>>> 

Post a Comment

Previous Post Next Post