Programming Paradigm Concepts
Eleanor Thomas
Senior Data Analytics Engineer
if
/else
statementsfor
loops and while
loopsdef
if my_height > your_height:
print("I'm taller!")
for height in height_list:
print(height)
Combined:
for height in height_list:
if my_height > height:
print("I am taller than ", height)
def compare_heights(my_height, height_list): for height in height_list: if my_height > height: print("I am taller than ", height) return
my_height = 63 height_list = [62, 67, 70]
compare_heights(my_height, height_list)
if
statements, loops, and Python functionsProgramming Paradigm Concepts