# 数字范围
from randomimport choice, random
for iin range(1,10,2):
print(i)
# 随机挑选一个元素
tuple1 = (1,2,3,4,5)
list1 = ['a','b','c']
set1 = {1,2,5}
n = choice(tuple1)
print(n)
# 生成一个0-1的随机数字
num = random()
numint =int(num*100)
print(num)
print(numint)
for iin range(10):
print(i)
网友评论