A program to get average scores and credits for Python questions

Asked 1 weeks ago, Updated 1 weeks ago, 0 views

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

2022-09-20 10:50

1 Answers

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")    


2022-09-20 10:50

If you have any answers or tips


© 2022 pinfo. All rights reserved.