返回列表 發帖
  1. list = []
  2. while True:
  3.     n = input("Enter Number(stop input x):")
  4.     if (n == "x"):
  5.         break
  6.     else:
  7.         n = int(n)
  8.         list.append(n)
  9. from random import *
  10. print(choice(list))
  11. print(random())
  12. print(uniform(3,10))
  13. print(randint(0,1))
  14. print(randrange(3))
  15. print(randrange(1,3))   
  16. print(randrange(1,6,2))
複製代碼

TOP

返回列表