python生成2位小数点的随机数
时间:2017-10-23 21:29:25
收藏:0
阅读:1071
#coding=utf-8
import random #生成随机数,浮点类型 a = random.uniform(10, 20) #控制随机数的精度round(数值,精度) print round(a, 2)
原文:http://www.cnblogs.com/tester-go/p/7718910.html
评论(0)