搏一搏 单车变跑车
祝各位开出大奖!!
后续会持续更新,欢迎关注👏
from random import randint
def gener_blue_ball():
return randint(1, 33)
def gener_blue_ball_s():
blue_ball_set = set()
while True:
if len(blue_ball_set) == 6:
blue_ball_list = list(blue_ball_set)
blue_ball_list.sort()
return ' '.join([str(b) for b in blue_ball_list])
else:
blue_ball_set.add(gener_blue_ball())
def gener_red_ball():
return randint(1, 16)
if __name__ == '__main__':
nums = input('请输入你要随机买的注数:', )
for i in range(int(nums)):
print(f"{gener_blue_ball_s()} {gener_red_ball()}")
效果图如下: