grade in exam using if else elif in Python

Mark of a student in Exam is taking as input. Based on this mark grade is decided by using if , elif and else.

More than or equal to 80 is A grade
More than or equal to 60 is B grade
More than or equal to 40 is C grade
Less than 40 mark is Fail
m=int(input("Enter your mark "))
if(m>=80):
    print("You got A grade")
elif(m>=60):
    print("You got B grade")
elif(m>=40):
    print("You got C grade")
else:
    print("Failed in this Exam ")
if elif else condition check
Python if else and elif to execute code blocks based on condition checking True or False

View and Download if_else_elif ipynb file ( .html format )
if else elif
Subscribe to our YouTube Channel here


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com



    Post your comments , suggestion , error , requirements etc here





    Python Video Tutorials
    Python SQLite Video Tutorials
    Python MySQL Video Tutorials
    Python Tkinter Video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer