首页 > 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

更多相关:

  • 第一篇博客 本文来自 自己老师 的博客 http://blog.csdn.net/lovelion/article/details/7818983 题目:某软件公司为某电影院开发了一套影院售票系统,在该系统中需要为不同类型的用户提供不同的电影票打折方式,具体打折方案如下:       (1) 学生凭学生证可享受票价8折优惠;     ...

  • ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★➤微信公众号:山青咏芝(shanqingyongzhi)➤博客园地址:山青咏芝(https://www.cnblogs.com/strengthen/)➤GitHub地址:https://github.com/strengthen/LeetCode➤原文地...

  • 转自:http://stackoverflow.com/questions/8377091/what-are-the-differences-between-cv-8u-and-cv-32f-and-what-should-i-worry-about CV_8U is unsigned 8bit/pixel - ie a pixel...