题解 | #游乐园的门票#

游乐园的门票

https://www.nowcoder.com/practice/29cc8d49d7bf4197a1cdbfcee340f846

while True:
    print("Please tell me your height!\nEnter 'quit' to end the program.")
    a = input()
    if str(a) == 'quit':
        break
    elif float(a) <= 1.0:
        print('Your admission cost is 0 yuan.')
    elif float(a) > 1.0 and float(a) <= 1.2:
        print('Your admission cost is 80 yuan.')
    elif float(a) > 1.2:
        print('Your admission cost is 150 yuan.')
全部评论

相关推荐

09-19 14:12
武汉大学 golang
并没有发笔试,只是顺延了两次,去看官网发现流程结束了
无敌忍耐王:三个工作日没人捞就自动结束了
投递美团等公司10个岗位
点赞 评论 收藏
分享
07-27 16:41
门头沟学院 Java
程序员小白条:学历和简历问题,你想走开发,现在很难的啦,尤其后端方向很难走,前端、测开,都会好很多,另外要等8月底和9月初去投日常
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务