python中if else流程判断
2021-06-27 14:07
标签:bigger RoCE got use proc ... rip welcome and 输入结果 2. python中if else流程判断 标签:bigger RoCE got use proc ... rip welcome and 原文地址:https://www.cnblogs.com/wz123/p/9651712.html_username=‘Lily‘
_password=‘123‘
username=input("username:")
password=input("password:")
if _username==username and _password==password:
print("Welcome user {name} login....".format(name=username))
else:
print("Invalid username or password")
F:\py\pyProject\venv\Scripts\python.exe F:/py/pyProject/Day3.py
username:Lily
password:123
Welcome user Lily login....
Process finished with exit code 0
grade_of_Lucy = 85
guess_grade = int(input("guess grade:"))
if guess_grade == grade_of_Lucy:
print("yes,you got it")
elif guess_grade > grade_of_Lucy:
print("think bigger")
else:
print("think smaller")