到目前为止,这是我想出的。我需要将初学者的 Python 技能应用到这个程序中。
import math
import random
print("Enter your grades below:\n")
grades = float(input())
B = 80
A = 90
C = 70
while grades >= B and grades < A:
if grades > B:
Grades = B
B = float(input())
if grades >= B and grades < 90:
print("B is more")
elif grades < B and grades >= C:
C = float(input())
print("C is more")
if grades == -1:
print("Most of your grades are B and C")