美文网首页
判断语句

判断语句

作者: python小可爱 | 来源:发表于2018-05-20 22:38 被阅读0次

    if语句

    if - else语句

    结果:

    代码:

    chePiao = 1 # 用1代表有车票,0代表没有车票

    if chePiao == 1:

    print("有车票,可以上火车")

    print("终于可以见到Ta了,美滋滋~~~")

    else:

    print("没有车票,不能上车")

    print("亲爱的,那就下次见了")

    相关文章

      网友评论

          本文标题:判断语句

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