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