Skip to content

Commit cd99923

Browse files
committed
Using Logical Operators
1 parent 66711e2 commit cd99923

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

0009-If-Else-Elif/if_else_elif.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,18 @@
6262
print("Negative number")
6363

6464
print(f"======================================================")
65+
66+
67+
print("Using Logical Operators example")
68+
69+
AGE = 40
70+
71+
has_id = True
72+
73+
if AGE >= 18 and has_id:
74+
print(f"You can enter the club, as your age is {AGE}.")
75+
else:
76+
print(f"Entry denied, as your age is {AGE}.")
77+
78+
79+
print(f"======================================================")

0 commit comments

Comments
 (0)