题解 | #牛牛的绩点#
牛牛的绩点
https://www.nowcoder.com/practice/de8bc3e736164786b07a4dd64ed172f7
dict1 = {"A": 4.0, "B": 3.0, "C": 2.0, "D": 1.0, "F": 0} b = [] d = [] while True: a = input() if a == 'False': break else: c = int(input()) b.append(dict1[a] * c) d.append(c) avg = sum(b) / sum(d) print('%.2f' % avg)