1. 程式人生 > >python Day01

python Day01

bold col 語句 odin font color 交互式 簡單 username

練習:

變量賦值、交互式輸入、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