Obtain the average score of the two subjects, and write a program to get grades A 80 or higher, 70 or higher C 60 or higher, D or F (variable names are specified as score1, score2)
How do I solve the question?
python
score1=int(input('score1:'))
score2=int(input('score2:')
result=(score1+score2)/2
if result>=90:
print("A")
elif result>=80:
print("B")
elif result>=70:
print("C")
elif result>=60:
print("D")
else:
print("F")
© 2024 OneMinuteCode. All rights reserved.