用户:
轩轩168查看:0 回复:1 评论:0 创建时间:2021-08-17T15:10:26
【作品展示】

【作品介绍】
更新了
【作品源代码】
import random
while True:
input("按下enter生成")
a = input("地址码:")
e = [1,3,5,7,8,10,12]
f = [4,6,9,11]
j = [7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2]
b = random.randint(1990,2020)
c = random.randint(1,12)
if b % 4 == 0 and b % 100 != 0 or b % 400 == 0:
if c in e:
d = random.randint(1,31)
elif c in f:
d = random.randint(1,30)
else:
d = random.randint(1,29)
else:
if c in e:
d = random.randint(1,31)
elif c in f:
d = random.randint(1,30)
else:
d = random.randint(1,28)
if len(str(c)) == 1:
c = "0" + str(c)
if len(str(d)) == 1:
d = "0" + str(d)
year = str(b) + str(c) + str(d)
sunxu = str(random.randint(0,1)) + str(random.randint(0,1))
xingbie = random.randint(0,9)
zhanshi = str(a) + str(year) + str(sunxu) + str(xingbie)
zhanshi = list(zhanshi)
h = 0
jisuan = []
while h != 17:
jisuan.append(int(zhanshi[h]) * int(j[h]))
h += 1
h = 0
i = 0
while h != 17:
i += int(jisuan[h])
h += 1
i = i % 11
shenfenzheng = str(a) + str(year) + str(sunxu) + str(xingbie)
if i == 0:
shenfenzheng = str(shenfenzheng) + "1"
elif i == 1:
shenfenzheng = str(shenfenzheng) + "0"
elif i == 2:
shenfenzheng = str(shenfenzheng) + "x"
elif i == 3:
shenfenzheng = str(shenfenzheng) + "9"
elif i == 4:
shenfenzheng = str(shenfenzheng) + "8"
elif i == 5:
shenfenzheng = str(shenfenzheng) + "7"
elif i == 6:
shenfenzheng = str(shenfenzheng) + "6"
elif i == 7:
shenfenzheng = str(shenfenzheng) + "5"
elif i == 8:
shenfenzheng = str(shenfenzheng) + "4"
elif i == 9:
shenfenzheng = str(shenfenzheng) + "3"
elif i == 10:
shenfenzheng = str(shenfenzheng) + "2"
print(shenfenzheng)
mingzi = '赵 钱 孙 李 周 吴 郑 王 冯 陈 褚 蒋 沈 韩 杨 朱 秦 尤 许 何 吕 施 张 孔 曹 严 华 金 魏 陶 姜 戚 谢 邹 喻 柏 水 窦 章 云 苏 潘 葛 奚 范 彭 郎 鲁 韦 昌 马 苗 凤 花 方 俞 任 袁 柳 酆 鲍 史 唐 费 廉 岑 薛 雷 贺 倪 汤'.split(' ')
sg = mingzi[random.randint(1, len(mingzi))]
gf = mingzi[random.randint(1, len(mingzi))]
ng = mingzi[random.randint(1, len(mingzi))]
print('姓名:' + (str(ng) + (str(gf) + str(sg))))
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn