Skip to content

Commit 231169b

Browse files
committed
If-else-with-multiple-lines
1 parent 4664eae commit 231169b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

0009-If-Else-Elif/if_else_elif.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@
2323
print("You should be admitted to the Adult Department.")
2424
print(f"======================================================")
2525

26+
print(f"If-else-with-multiple-lines-example")
27+
print(f"Hospital admission when the age is {AGE}")
28+
29+
if AGE <= 18:
30+
print(f"Your age is {AGE}.")
31+
print("You should be admitted to the Pediatric Department.")
32+
else:
33+
print(f"Your age is {AGE}.")
34+
print("You should be admitted to the Adult Department.")
35+
print(f"======================================================")
36+
2637
print("if-elif-else example")
2738

2839
print("elif = else if")

0 commit comments

Comments
 (0)