python - 创建一个新帐户并登录到一个帐户
问题描述
如果他或她是第一次用户,我可以问如何要求用户创建一个新帐户,如果他或她不是第一次用户,请要求用户登录?
#Register Swinburne Sarawak Account
print("Please register for a login account with Swinburne Sarawak.")
def RegisterAccount():
while True:
RegisterAccount = ""
RegisterAccount = input("Are you a first time user of our online portal? ([Y]Yes/[N]No)")
FirstTimeUser = RegisterAccount.upper()
if FirstTimeUser == "Y":
print("You will need to create your account as a new student.")
elif FirstTimeUser == "N":
print("User Already Exist. Please login as a returning user.")
else:
continue
break
RegisterAccount()
解决方案
推荐阅读
- javascript - 我的显示/隐藏发生在所有循环结果上,而不是一键式
- ms-access - 在原始输入后自动将数据输入修剪到 Access 中的文本框中
- javascript - React Material UI 中的网格布局问题
- python - 从 selenium web 对象中获取文本并将其逐行附加到列表中
- requirejs - 防止 RequireJS 干扰遗留代码的建议
- python - Tkinter 异步鼠标和键盘输入
- c# - C# 递归文件夹搜索无法正常工作
- python - 从python中的图像中识别棋子
- javascript - Nodejs即使找不到函数也不会出错
- ios - Pickerview 线程 1:致命错误:在展开操作时意外发现 nil