419,703 views
22 votes
22 votes
Complete a flowchart and a Python program to calculate grade of a student based on marks using the following criteria:

Ask a student for their marks and if their marks are:

More than 90 – print “A*”

Between 80 and 90 – print “A”

Between 70 and 80 – print “B”

Between 60 and 70 – print “C”

Between 50 and 60 – print “D”

Between 40 and 50 – print “E”

Under 40 – print “Fail”

User Seyet
by
2.5k points

1 Answer

16 votes
16 votes

Answer:

grade = int(input("Enter grade: ")

if grade > 90:

print("A*")

elif grade > 80 and grade < 90:

print("A")

elif grade > 70 and grade < 80:

print("B")

elif grade > 60 and grade < 70:

print("C")

elif grade > 40 and grade < 50:

print("E")

else:

print("Fail")

Step-by-step explanation:

User MarkWalczak
by
2.5k points