首页 > 代码库 > day13 3.27

day13 3.27

1.密文密码  getpass.getpass

name = input("please input your name: ")
passwd = getpass.getpass("please input your passwd: ")

if name == "alex" and passwd ==  "123456":
    print("welcome alex")
else:
    print("Wrong username or password")

2. int str

age = 56
guess_age = int(input("please input age: "))

if guess_age > age:
    print("try smaller...")
elif guess_age < age:
    print("try bigger..")
else:
    print("you got it!")

  

day13 3.27