liujiaxin2018

 

>>> prizes = ["aaa","bbb","ccc","ddd","eee"]
>>> import random
>>> for i in range(1,11,1):        ## 设计抽十次
    print(f"The {i}th prize is {random.choice(prizes)}!")

    
The 1th prize is ddd!
The 2th prize is ddd!
The 3th prize is bbb!
The 4th prize is ddd!
The 5th prize is ddd!
The 6th prize is eee!
The 7th prize is ccc!
The 8th prize is bbb!
The 9th prize is eee!
The 10th prize is aaa!

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-04-27
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-21
猜你喜欢
  • 2022-02-02
  • 2021-09-30
  • 2021-06-18
  • 2022-12-23
  • 2021-12-11
相关资源
相似解决方案