# Python-What does this code signifies in relation to boolean logic?

#### shivajikobardan

##### New member
Code:
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")

Article says-:
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.

#### Jameson

Staff member
This is a weird example, I agree, but I think their idea is that the comparisons will resolve to True/False booleans which will then dictate the conditional flow.

#### shivajikobardan

##### New member
exactly very confusing example. I am tired of self learning. always stumbled upon these types of things.

#### Evgeny.Makarov

##### Well-known member
MHB Math Scholar
What is confusing about it? If you don't like it, consider this:
Python:
def age_class(my_age):
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")
and a call age_class(10) to the interpreter. Maybe by the time this example is encountered the course has not covered functions yet, and the authors want to provide a code fragment that compiles and runs correctly.