Python Exercise #30

来源:互联网 发布:柯桥司法拍卖淘宝网 编辑:程序博客网 时间:2024/05/29 12:12
#!/usr/bin/python      # exact position of python#!/usr/bin/env python  # position of python in enviornment# -*- coding:utf-8 -*- # Else And Ifpeople = 30cars = 40buses = 15if 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."

原创粉丝点击