python 2 教程
作者: CodeYang
条件语句

if..else..

hour=11
if(hour<12):
    print "Good morning"
else:
    print "Good afternoon"

if..elif..else..

hour=11
if(hour<12):
    print "Good morning"
elif(hour<18):
    print "Good afternoon"
else:
    print "Good evening"




标签: hour、good、print、morning、afternoon
一个创业中的苦逼程序员
  • 回复
隐藏