实现用户输入用户名和密码,当用户名为 seven 且密码为 123 时,显示登陆成功,否则登陆失败
user_name = "seven" user_password = "123" name = input("用户名:") password = input("密码:") if name == user_name and password == user_password: print("登录成功") else: print("登录失败")
原文地址:https://www.cnblogs.com/riling/p/10068548.html
时间: 2024-10-04 22:42:17