python中if else流程判断

2021-06-27 14:07

阅读:672

标签:bigger   RoCE   got   use   proc   ...   rip   welcome   and   

_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

 2.

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")

 

python中if else流程判断

标签:bigger   RoCE   got   use   proc   ...   rip   welcome   and   

原文地址:https://www.cnblogs.com/wz123/p/9651712.html


评论


亲,登录后才可以留言!