Wildwolf1995

业余学习编程的开始

      几经放弃,重拾,终于下定决心开始学习Python,有趣的是学习这门语言没有任何的目的,纯粹的是想学,想了解,想让自己会一门编程语言。之前做过各种尝试,但都无疾而终,不知道此次又能坚持多久,值得欣慰的是这次自己真的动手去记录,去敲打键盘了,万事开头难,坚持更不易,好在自己日记的小本本一直在写,这让自己也对坚持学习python有了点自信,在此记录第一次的学习。Hello World!

 1 age_of_oldboy = 23
 2 
 3 count = 0
 4 while count<3:#while True:
 5     guess_age =int(input("guess age:"))
 6     if guess_age == age_of_oldboy:
 7         print("yes, you got it.")
 8         break
 9     elif guess_age > age_of_oldboy:
10         print("think smaller...")
11     else:
12         print("think bigger")
13     count+=1
14     if count== 3:
15         countine_confirm=input("do you want to keep guessing..?")
16         if countine_confirm !='n':
17             count=0
18 else:#if count == 3:
19     print("Game Over")

 

posted on 2018-12-21 16:43  Wildwolf1995  阅读(161)  评论(0编辑  收藏  举报