#coding=utf-8

import random
#生成随机数,浮点类型
a = random.uniform(10, 20)
#控制随机数的精度round(数值,精度)
print round(a, 2) 

  

相关文章:

  • 2021-12-18
  • 2021-06-15
  • 2021-07-13
  • 2022-12-23
  • 2021-12-24
  • 2021-12-02
猜你喜欢
  • 2021-12-12
  • 2021-11-30
  • 2021-12-18
  • 2021-12-18
  • 2022-12-23
  • 2021-12-28
  • 2022-12-23
相关资源
相似解决方案