##Python##基础管理程序
前言
提示:
事先需创建password.txt和students.txt文件,并保证都在同一目录下
本文用的都是十分基础的python知识,没有太多技术含量
许多参数可根据自我需要修改
正文
一、我的运行环境:python38
二、源码CODE
import time
from tkinter import *
import tkinter as tk
print("\033[5;34;40m--Welcome to the Opreate System--\033[0m")
for i in range(1, 101):
print("\r", end="")
print("进度: {}%: ".format(i), "▓" * (i // 2), end="")
sys.stdout.flush()
time.sleep(0.05)
time.sleep(2)
username = "hk001" # 用户名
password = "12345" #密码
print("\nJoin in the system")
for a in range(3):
john = input("Username :")
if john == username:
break
else:
print("Try again,\nIt's error.")
print("You have two chances to try or input the 'q' and exit")
h = 1
while h < 4:
if h == 3:
print("It's end.")
break
john2 = input("Password :")
if john2 == password:
print("Welcome!\nAnd just wait.")
break
elif john2 == 'q':
print('Bye bye')
else:
print("Password is wrong!!!\nplease try again.")
if h == 3:
break
h += 1
student = ['Jack', 'Zzr', 'Hzl', 'Zyt']
student_password = ['12345', '123', '666']
while True:
for i in range(1, 101):
print(