1. 程式人生 > >初學python,打卡簽到

初學python,打卡簽到

遊戲 條件 col += world == 寫上 too 簡單

自學python第一周,學了變量和簡單的條件判斷。

附上猜數遊戲代碼

 1 #Author:shijt
 2 trueAge=40
 3 count=0
 4 while count<3:
 5     guessAge=int(input("how old is he?"))
 6     if guessAge==trueAge:
 7         print("yes,great!")
 8         break
 9     elif guessAge>trueAge:
10         print("too big")
11     else:
12         print
("too small") 13 14 count+=1 15 if count==3: 16 flag=input("do you want to countine?") 17 if flag!=n: 18 count=0

以後可以在簡歷上寫上:

精通python。。。。。。。hello,world的輸出

初學python,打卡簽到