python 生成随机数 import random print random.randint(0,5) #生成0-5之间的随机整数 print random.uniform(0, 5) #生成0-5之间的随机浮点数