## User will enter three grades averages (exam, project, and lab). Determine which of the three grades (consider any ties) is the highest grade

Question

User will enter three grades averages (exam, project, and lab). Determine which of the three grades (consider any ties) is the highest grade and display the results. Determine which of the three grades (consider any ties) is the lowest grade and display the results. Check for any grades failing below 70% and display each individual grade. Calculate the average grade using the three grades and display the average grade. If they are all 70 and above then display the fact that they are all 70% or above.

in progress 0
2 months 2021-07-23T17:29:45+00:00 1 Answers 0 views 0

In Python:

exam = int(input(“Exam: “))

project = int(input(“Project: “))

lab = int(input(“Lab: “))

if exam >= project and exam >= lab:

elif project >= exam and project >= lab:

else:

if exam <= project and exam <= lab:

elif project <= exam and project <= lab:

else:

if exam < 70:

print(“Exam: “+str(exam))

if project < 70:

print(“Project: “+str(project))

if lab < 70:

print(“Lab: “+str(lab))

print(“\nAverage: “+str((exam+project+lab)/3))

if exam > 70 and project >70 and lab > 70:

Step-by-step explanation:

The next three lines get input for exam, project and lab

exam = int(input(“Exam: “))

project = int(input(“Project: “))

lab = int(input(“Lab: “))

This condition checks if exam is the highest grade

if exam >= project and exam >= lab:

If true, exam is printed as the highest grade

This condition checks if project is the highest grade

elif project >= exam and project >= lab:

If true, project is printed as the highest grade

If otherwise

else:

lab is printed as the highest grade

This condition checks if exam is the lowest grade

if exam <= project and exam <= lab:

If true, exam is printed as the lowest grade

This condition checks if project is the lowest grade

elif project <= exam and project <= lab:

If true, project is printed as the lowest grade

If otherwise

else:

lab is printed as the lowest grade

This checks if exam is below 70.

if exam < 70:

If true, exam score is printed

print(“Exam: “+str(exam))

This checks if project is below 70

if project < 70:

If true, project score is printed

print(“Project: “+str(project))

This checks if lab is below 70

if lab < 70:

If true, lab score is printed

print(“Lab: “+str(lab))

This calculates and prints the average

print(“\nAverage: “+str((exam+project+lab)/3))

This checks if all three scores are above 70

if exam > 70 and project >70 and lab > 70:

If true, the the message that all are above 70, is printed