找回密码
 立即注册
搜索
热搜: Excel discuz
查看: 1131|回复: 0

[经典练习题] 生成随机数

[复制链接]

482

主题

7万

元宝

75万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
750849
发表于 2021-8-15 15:36:26 | 显示全部楼层 |阅读模式
  1. import random
  2. print(random.uniform(10,20))
  3. # 18.3558436154919
  4. print(random.randint(10,20))
  5. # 17
复制代码



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|五花八门论坛 ( 豫ICP备15031300号-3 )

GMT+8, 2024-4-25 17:31 , Processed in 0.082667 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表