Ralap_T 2022-09-25 14:28 采纳率: 60%
浏览 8
已结题

python无限在那print

img


麻烦老哥们能不能帮忙看看这个为什么无限在那print

img


是7-5的要求

  • 写回答

2条回答 默认 最新

  • 凯歌响起 2022-09-25 15:31
    关注

    age_price="Tell me your age,and I'll tell you the price of the ticket:"
    age_price=input(age_price)
    age_price=int(age_price)
    while age_price:
    if age_price < 3:
    price =0
    break
    elif age_price < 12:
    price = 10
    break
    else:
    price= 15
    break
    print(f"You need to pay ${price} for ticket")

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 11月15日
  • 已采纳回答 11月7日
  • 创建了问题 9月25日