标签:tmp port int 猜数字 font random print 字母 weight
import random
checkde=‘‘
# for i in range(4):
# current = random.randint(1,9) #选取1-9的数字
#
# checkde+=str(current)# 转成数字
#
#
#
#
for i in range(5):
current = random.randrange(0,5)#猜数字
#字母
if current == i:
tmp=chr(random.randint(65,90)) #从字母65-90里面找字母
else:
tmp=random.randint(0,9) #否则 在0-9里面寻找数字
checkde+=str(tmp)# 转成数字
print(checkde)
标签:tmp port int 猜数字 font random print 字母 weight
原文地址:http://www.cnblogs.com/zj0724/p/7429183.html