题解 | #牛牛的绩点#
牛牛的绩点
https://www.nowcoder.com/practice/de8bc3e736164786b07a4dd64ed172f7
d = {"A": 4, "B": 3, "C": 2, "D": 1, "F": 0} # 绩点 s = input() num1 = 0 num2 = 0 while s != "False": s1 = int(input()) num1 += d[s] * s1 # 绩点和 num2 += s1 # 学分和 s = input() print("%.2f" % (num1 / num2))