Python学习笔记-day1(while流程控制)
生活随笔
收集整理的這篇文章主要介紹了
Python学习笔记-day1(while流程控制)
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
count = 0
while True:#print('count:',count)if count == 3:print('you guess over 3 times!fuck off!')breakage = int(input('Please guess the lmc age:'))if age == 18:print('yes,you got it!')breakelif age < 18:print('think bigger…')else:print('think smaller…')count=count+1
count = 0 while count < 3:#print('count:',count)age = int(input('Please guess the lmc age:'))if age == 18:print('yes,you got it!')breakelif age < 18:print('think bigger…')else:print('think smaller…')count=count+1 else:#當(dāng)while后條件不成立時執(zhí)行print('you guess over 3 times!fuck off!')
count = 0 while count < 3:#print('count:',count)age = int(input('Please guess the lmc age:'))if age == 18:print('yes,you got it!')breakelif age < 18:print('think bigger…')else:print('think smaller…')count=count+1 else:#當(dāng)while后條件不成立時執(zhí)行print('you guess over 3 times!fuck off!')
<wiz_tmp_tag id="wiz-table-range-border" contenteditable="false" style="display: none;">
轉(zhuǎn)載于:https://www.cnblogs.com/limich/p/7474778.html
總結(jié)
以上是生活随笔為你收集整理的Python学习笔记-day1(while流程控制)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 科学转换法
- 下一篇: AndroidTv Home界面实现原理