首页 > 代码库 > python Day01

python Day01

练习:

 

变量赋值、交互式输入、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...")




python Day01