python随机数 #通过random模块 import random # 随机整数0到100 a = random.randint(0,100) print(a) # 随机浮点数:0到1 m = random.random() print(m)