import statistics
import matplotlib.pyplot as plt
i=0
a=[]
for i in range(0,101):
a.append(0)
x=0
def ad(f,t):
for x in range(f,t+1):
a[x]=a[x]+1
for x in range(1,6):
l=""
l=input("请输入第"+str(x)+"科的等第(A+/A/B+/B/C)")
if l=="A+":
ad(0,10)
if l=="A":
ad(11,30)
if l=="B+":
ad(31,60)
if l=="B":
ad(61,90)
if l=="C":
ad(91,100)
g=0
k=0
r=[]
for g in range(0,len(a)):
for k in range(0,a[g]):
r.append(g)
p=[]
for i in range(0,101):
p.append(i)
plt.bar(p,a)
print("前"+str(statistics.mean(r))+"%")
print("黄色为估测")
plt.bar(statistics.mean(r),a[int(statistics.mean(r))],color='yellow')
plt