154k views
0 votes
Program directions: Your math instructor has given two quizzes worth 30 points each. Your overall grade is the sum of the two quiz scores. You are to write a program that asks the user to input two integer quiz scores and then calculate the overall grade using the following grade scale. If either square is greater than 30 or less than zero, print “ERROR”

A = 54 or higher
B = 48 or higher, but less than 54
C = 42 or higher, but less than 48
D = 36 or higher, but less than 42
F = Less than 36

IN EDHESIVE OR PYTHON PLEASE

User Amirkhm
by
5.8k points

1 Answer

4 votes

Answer:

Step-by-step explanation:

subject_1_marks=input("Enter first subject marks")

subject_2_marks=input("Enter Second subject marks")

if((subject_1_marks)**2 OR (subject_2_marks)**2) >30:

print(ERROR)

eIif( subject_1_marks+subject_2_marks>=54):

print(A)

eIif( subject_1_marks+subject_2_marks>=54 AND subject_1_marks+subject_2_marks<=48 ):

print(B)

eIif( subject_1_marks+subject_2_marks>=48 AND subject_1_marks+subject_2_marks<=42 ):

print(B)

eIif( subject_1_marks+subject_2_marks>=42 AND subject_1_marks+subject_2_marks<=36 ):

print(C)

elif( subject_1_marks+subject_2_marks<=36):

print(F)

else:

print(some thing is wrong)

User Thormer
by
6.7k points