CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
jackfrued

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: jackfrued/Python-100-Days
Path: blob/master/Day01-15/code/Day03/verify.py
Views: 729
1
"""
2
用户身份验证
3
4
Version: 0.1
5
Author: 骆昊
6
Date: 2018-02-28
7
"""
8
# import getpass
9
# from getpass import getpass
10
# from getpass import *
11
12
username = input('请输入用户名: ')
13
password = input('请输入口令: ')
14
# 输入口令的时候终端中没有回显
15
# password = getpass.getpass('请输入口令: ')
16
if username == 'admin' and password == '123456':
17
print('身份验证成功!')
18
else:
19
print('身份验证失败!')
20
21