4.3 KiB
4.3 KiB
In [ ]:
if True:
print('It was true!')In [ ]:
x = False
if x:
print('x was True!')
else:
print('I will be printed in any case where x is not true')In [ ]:
loc = 'Bank'
if loc == 'Auto Shop':
print('Welcome to the Auto Shop!')
elif loc == 'Bank':
print('Welcome to the bank!')
else:
print('Where are you?')In [ ]:
person = 'Sammy'
if person == 'Sammy':
print('Welcome Sammy!')
else:
print("Welcome, what's your name?")In [ ]:
person = 'George'
if person == 'Sammy':
print('Welcome Sammy!')
elif person =='George':
print('Welcome George!')
else:
print("Welcome, what's your name?")