猫史档案馆


帮我看看哪里错了,为什么他不从a你面随机?

用户:wjt吴wjt吴查看:0 回复:3 评论:0 创建时间:2024-01-31T19:20:21


import random
a = ['a','b','c','d','e','f','g']
n = random.choice(a)
w = random.randint(1, 6)
print(a,w)


回复

上一页1 页 / 共 1下一页
小奕小奕小奕小奕小奕小奕

random.randint应从0开始

点赞0


评论


SCS_user_i1eril0dUySCS_user_i1eril0dUy

第四行应为

w=random.randint(0,5)

(¿)

点赞0


评论


小奕小奕小奕小奕小奕小奕

第四行应为

w=random.randint(0,6)

点赞0


评论