88.6k views
1 vote
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 Soumia
by
5.5k points

1 Answer

4 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 Axblount
by
5.1k points