price = 500
for i in range(1, ▲ ) :...
guess = int (input (“请输风商品价格:”))
if guess == price:
print(“恭喜你,猜中了!”)
break #跳出当前循环,执行循环外的下一条语句
elif guess >price:
print (“猜多了!”)
else:
print (“猜少了!”)
if i==5:
print (“很遗憾,5次机会已用完!”)
请根据流程图补全程序代码:。
微信扫码预览、分享更方便