Python基础管理程序

以最基础的python知识做了个简单的管理程序
摘要由CSDN通过智能技术生成

##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(
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值