import random
m = 0
a = 0
b = 0
c = 0
while m < 10000:
n = random.random()*361
if n>=0 and n<10:
a = a + 1
m = m + 1
elif n>=10 and n<120:
b = b + 1
m = m + 1
else:
c = c + 1
m = m + 1
print('一等奖获得次数为:',a,'二等奖获得次数为:',b,'三等奖获得次数为:',c)
一等奖获得次数为: 291 二等奖获得次数为: 3012 三等奖获得次数为: 6697