Write a program to read the marks and assign a grade to a student. Grading system: A (>=90), B (80-89), C (70-79), D(60-69), E (50-59), F (<50). (Use the Switch case)

You need python3.10 or above to use switch case

Code

print("This program will assign a grade to your marks.")
marks = int(input("Enter your marks: "))

match marks//10:
case 10:
print("A")
case 9:
print("A")
case 8:
print("B")
case 7:
print("C")
case 6:
print("D")
case 5:
print("E")
case _:
print("F")

Output