• 2022-06-19
    (程序完善题)下面代码的功能是,随机生成50个介于[1,20]之间的整数,然后统计每个整数出现频率。请把缺少的代码补全。 import random x = [random.____________(1,20) for i in range(_______)] r = dict() for i in x: r[i] = r.get(i, _____)+1 for k, v in r.items(): print(k, v)[/i]