标签:输入 coding print pytho and guess name NPU port
# -*- coding:utf-8 -*-
# Author:DliYao
import getpass
‘‘‘
_username = "dengliyao"
_password = "dly"
username = input("username: ")
#password = getpass.getpass("password: ")
password = input("password: ")
if _username == username and _password == password:
print("{name}...登陆成功".format(name=username))
else:
print("用户名或密码错误")
‘‘‘
#用户输入一个年龄进行判断
age_of_oldboy = 20
guess_age = int(input("guess age: "))
if guess_age == age_of_oldboy:
print("正确")
elif guess_age > age_of_oldboy:
print("大了")
else:
print("小于")
标签:输入 coding print pytho and guess name NPU port
原文地址:https://www.cnblogs.com/dliy/p/10705175.html