Introducing a Simple Funny Grading System Program in Python

Hey there! 

This is my first program on the learn-in-public journey

Today, I'm excited to share a Python program I wrote that implements a simple grading system based on percentage scores. Check it out below:


# 1. If the percentage is between 85 and 100 (inclusive), print "O"
# 2. If the percentage is between 75 and 84.99, print "A"
# 3. If the percentage is between 65 and 74.99, print "B"
# 4. If the percentage is between 50 and 64.99, print "C"
# 5. If the percentage is between 35 and 49.99, print "D"
# 6. If the percentage is below 35, print "Sorry! You didn't pass the exam. Try next time"

perc = int(input("Enter your percentage: "))

if 85 < perc <= 100:
    print("Grade OHHO")
elif perc > 100:
    print("Beta thoda izzat se")
elif 75 <= perc < 85:
    print("Grade A")
elif 65 <= perc < 75:
    print("Grade B")
elif 55 <= perc < 65:
    print("Grade C")
elif 35 <= perc < 55:
    print("Grade D")
elif perc <= 0:
    print("Beta Chullu bhar pani lana!!")
else:
    print("Sorry! Iss Saal Apka Beta Graduate Nahi Hoga")


Happy coding! 

Comments

Popular posts from this blog

From Operations to Tech: My Journey into Learning in Public

Colorful QR Code in python