美文网首页
笨方法学python 习题30

笨方法学python 习题30

作者: d1b0f55d8efb | 来源:发表于2017-07-18 16:28 被阅读0次
    people = 30
    cars = 40
    buses = 15
    
    if cars > people:
        print ("We should take the cars.")
    elif cars < people:
        print ("We should not take the cars.")
    else:
        print ("We can't decide.")
    
    if buses > cars:
        print ("That's too many buses.")
    elif buses < cars:
        print ("Maybe we could take the buses.")
    else:
        print ("We still can't decide.")
    
    if people > buses:
        print ("Alright, let's just take the buses.")
    else:
        print ("Fine, let's stay home then.")
    
    We should take the cars.
    Maybe we could take the buses.
    Alright, let's just take the buses.
    

    相关文章

      网友评论

          本文标题:笨方法学python 习题30

          本文链接:https://www.haomeiwen.com/subject/zrehkxtx.html