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!")
时间: 2024-10-05 10:07:12