當(dāng)前位置:
首頁(yè) >
打卡签到python代码_[python] 初学python,打卡签到
發(fā)布時(shí)間:2023/12/20
36
豆豆
生活随笔
收集整理的這篇文章主要介紹了
打卡签到python代码_[python] 初学python,打卡签到
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
自學(xué)python第一周,學(xué)了變量和簡(jiǎn)單的條件判斷。
附上猜數(shù)游戲代碼
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
以后可以在簡(jiǎn)歷上寫(xiě)上:
精通python。。。。。。。hello,world的輸出
總結(jié)
以上是生活随笔為你收集整理的打卡签到python代码_[python] 初学python,打卡签到的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 基于 Amazon Amplify 构建
- 下一篇: unity 通过 dll 传递字符串给p