#在 上补充代码 import random s-input(“请输入随机种子:” 15 = 11 for i in range (26): Is.append (chr(ord ('a') +i)) for i in range(10): Is.append (chr( (1)_ random.seed( (2) for i in range (10): for j in range(8): print( (3) print0
时间: 2024-04-02 18:33:20 浏览: 69
import random.py
对不起,上面的代码有些错误,以下是正确的代码:
import random
s = input("请输入随机种子:")
random.seed(s)
char_set = []
for i in range(26):
char_set.append(chr(ord('a') + i))
for i in range(10):
char_set.append(str(i))
for i in range(10):
code = ''
for j in range(8):
code += random.choice(char_set)
print(code)
阅读全文