题解 | #牛牛的绩点#
牛牛的绩点
https://www.nowcoder.com/practice/de8bc3e736164786b07a4dd64ed172f7
笨方法
c = 0 i = 0 d=0 while True: a = input() if a == "False": break if a == "A": b = float(input()) d=d+b c += b * 4 if a == "B": b = float(input()) c += b * 3 d=d+b if a == "C": b = float(input()) c += b * 2 d=d+b if a == "D": b = float(input()) c += b * 1 d=d+b if a == "F": b = float(input()) c += b * 0 d=d+b i += 1 print('%.2f'%(c / d))