您好,登錄后才能下訂單哦!
import os,sys,getpass,time,json
print('*歡迎來到召喚師峽谷')
login_name = input('請輸入您的賬號:')
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("你的賬號被封停,請聯系客服")
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('請輸入密碼:')
if login_pwd == a[b.index(login_name)]:
sys.exit('即將進入游戲')
else:
count += 1
print('密碼錯誤,請重新輸入,你好友%s次機會'%(3-count))
else:
lock_file.write(login_name + '\r\n')
sys.exit('輸入次數過多,賬號已被綁定')
else:
print('賬號不存在')
lock_file.close()
user_file.close()
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。