深入流程控制.docVIP

  • 4
  • 0
  • 约 11页
  • 2016-11-22 发布于河南
  • 举报
深入流程控制

More Control Flow Tools 深入流程控制? Besides the while statement just introduced, Python knows the usual control flow statements known from other languages, with some twists. 除了 while 关键字 if Statements? Perhaps the most well-known statement type is the if statement. For example: 可能最有名的语句是 :keyword:`if`。例如: x = int(input(Please enter an integer: )) if x 0: ... x = 0 ... print(Negative changed to zero) ...elif x == 0: ... print(Zero) ...elif x == 1: ... print(Single) ...else: ... print(More) ... There can be zero or more elif parts, and the else part is optional. The keyword ‘e

文档评论(0)

1亿VIP精品文档

相关文档