python练习:猜价钱小游戏
生活随笔
收集整理的這篇文章主要介紹了
python练习:猜价钱小游戏
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
#猜價錢 trueprice = 202 price = input("Please guess the price:") while (int(price) != trueprice):if(int(price) > trueprice):price = input("Your price is higher,Please try again:")else:price = input("Your price is lower,Please try again:") print("Great! The price is %s" %price)
?
轉載于:https://www.cnblogs.com/lxyykl001/p/11189769.html
總結
以上是生活随笔為你收集整理的python练习:猜价钱小游戏的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 戏说 .NET GDI+系列学习教程(三
- 下一篇: 14年底配五菱之光跑了11万公里能卖多少