原创 我的友情鏈接
51CTO博客開發
原创 格式化輸出
name = input("name: ") age = input("age: ") job = input("job: ") msg = ''' The infomation of user' %s ': -----------star
原创 簡單的登錄判斷
name = 'jacky' password = 'abc123' n = input("name=") p = input("password=") if n == name and p == password: print (
原创 把輸入的三個數從小到大排列
x=input('x=:') y=input('y=:') z=input('z=:') t=0 if(x>y): t=x x=y y=t if(x>z): t = x x = z z = t
原创 格式化輸出
name = input("name: ") age = input("age: ") job = input("job: ") msg = ''' The infomation of user' %s ': -----------star
原创 猜年齡,用戶輸入超過3次詢問是否繼續,共10次機會。
age = 30 c = 0 #定義記數器 for i in range(10): if c < 3: guess = int(input("Plseae guess my age:")) if
原创 統計英文字母、空格、數字和其它字符的個數
import string def main(): s = input('input a string:') letter = 0 space = 0 digit = 0 other = 0
原创 我的友情鏈接
51CTO博客開發