标签:color name welcome password 语句 mat user usr pytho
练习:
变量赋值、交互式输入、if语句简单使用。
例子:
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author Jean
name = "jean"
passd = "123456"
username = input("username: ")
password = input("password: ")
if username == name and password == passd:
print("Welcome {name} login".format(name=username))
else:
print("Invaild user or password...")
标签:color name welcome password 语句 mat user usr pytho
原文地址:http://www.cnblogs.com/liuyibai/p/7133436.html