#!/usr/bin/python3
# conditionals.py by Bill Weinman [http://bw.org/]
# This is an exercise file from Python 3 Essential Training on lynda.com
# Copyright 2010 The BearHeart Group, LLC
def main():
a, b = 0, 1
if a < b:
print('this is true')
if __name__ == "__main__": main()
def main():
a, b = 1, 1
if a < b:
print('this is true')
if __name__ == "__main__": main()
def main():
a, b = 1, 1
if a < b:
print('this is true')
else:
print('it is not true')
if __name__ == "__main__": main()
##
def main():
a, b = 0, 1
if a < b:
print('this is true')
else:
print('it is not true')
if __name__ == "__main__": main()
##
def main():
a, b = 1, 1
if True:
print('this is true')
else:
print('it is not true')
if __name__ == "__main__": main()
##
def main():
a, b = 1, 1
if False:
print('this is true')
else:
print('it is not true')
if __name__ == "__main__": main()
##
def main():
v = 'one'
if v == 'one':
print('v is one')
elif v == 'two':
print('v is two')
elif v == 'three':
print('v is three')
if __name__ == "__main__": main()
##
def main():
v = 'two'
if v == 'one':
print('v is one')
elif v == 'two':
print('v is two')
elif v == 'three':
print('v is three')
if __name__ == "__main__": main()
##
def main():
v = 'three'
if v == 'one':
print('v is one')
elif v == 'two':
print('v is two')
elif v == 'three':
print('v is three')
if __name__ == "__main__": main()
##
def main():
v = 'seven'
if v == 'one':
print('v is one')
elif v == 'two':
print('v is two')
elif v == 'three':
print('v is three')
else:
print('v is some other thing')
if __name__ == "__main__": main()