my_age = 10 if my_age >= 100: print("One hundred years old! Very impressive.") elif my_age <= 3: print("Awwww. Just a baby.") else: print("Ah - a very fine age indeed")
Learn to use boolean (True and False) values in your Python 3 code Great post on fullstackpython.com!
Booleans are used in your code to make it behave differently based on current conditions within your program. You can use boolean values and comparisons in conjunction with the if, elif, and else keyoards as one means to achieve this.