您好,登錄后才能下訂單哦!
import os,sys,getpass,time,json
print('*歡迎來(lái)到召喚師峽谷')
login_name = input('請(qǐng)輸入您的賬號(hào):')
lock_file = open('lock_file.txt','r+')
lock_list = lock_file.readlines()
lock = []
for lock_info in lock_list:
lock_info = lock_info.strip('\n')
lock.append(lock_info)
#print(lock)
if login_name in lock:
sys.exit("你的賬號(hào)被封停,請(qǐng)聯(lián)系客服")
user_file = open('user_file.txt','r+')
user_list = user_file.readlines()
#user_list = user_list.strip('\n')
user = []
for user_info in user_list:
user_info = user_info.strip('\n')
user_info = user_info.split() #
user.append(user_info)
print(user)
count = 0
b = [x[0] for x in user]
a = [x[1] for x in user]
print(b)
print(a)
if login_name in b:
while count < 3:
login_pwd = input('請(qǐng)輸入密碼:')
if login_pwd == a[b.index(login_name)]:
sys.exit('即將進(jìn)入游戲')
else:
count += 1
print('密碼錯(cuò)誤,請(qǐng)重新輸入,你好友%s次機(jī)會(huì)'%(3-count))
else:
lock_file.write(login_name + '\r\n')
sys.exit('輸入次數(shù)過(guò)多,賬號(hào)已被綁定')
else:
print('賬號(hào)不存在')
lock_file.close()
user_file.close()
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。