Difference between revisions of "Control Flow, if statements etc.."

From rbachwiki
Jump to navigation Jump to search
Line 1: Line 1:
=If Statemts=
=If Statemts=
  if case1:
name = "b"
     perform action1
  if name == 'robert':
  elif case2:
     print(name)
     perform action2
  elif name == 'john':
  else:  
     print(name)
     perform action3
  else:
     print('wrong name')

Revision as of 20:06, 6 January 2019

If Statemts

name = "b"
if name == 'robert':
   print(name)
elif name == 'john':
   print(name)
else:
   print('wrong name')