05 conditional branch

'' ' 
If

' ''
A. 1 =
B 2 =
if A == B:
Print (A)
Print (B)

'' '
with the C language is different, python language format if the Boolean expression must if not :( colon shown)
Second, strict Python indentation, the same format as the same module indentation
statement if the same control as the number of cells indented all statements
' ''

'' '
if-the else
' ''
a. 1 =
B = 2
IF A> B:
Print (A)
the else:
Print (B)

'' '
IF-elif-the else
' ''
Score = 95
IF Score> = 90:
Print ( 'A')
elif Score> = 70:
Print ( 'B')
the else:
Print ( 'C')

'' '
Python learning process, there is no switch-case control statements
' ''

Guess you like

Origin www.cnblogs.com/wsxcode/p/12198417.html
05