#!/uer/bin/python # coding utf-8 user = input(‘请输入用户‘) pwd =input(‘请输入密码‘) if user =="huang" and pwd =="123": print("恭喜你登录成功!") else: print("登录失败请重新登录")
运行结果:
请输入用户huang
请输入密码123
恭喜你登录成功!
时间: 2024-12-09 13:09:56
#!/uer/bin/python # coding utf-8 user = input(‘请输入用户‘) pwd =input(‘请输入密码‘) if user =="huang" and pwd =="123": print("恭喜你登录成功!") else: print("登录失败请重新登录")
运行结果:
请输入用户huang
请输入密码123
恭喜你登录成功!