PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#Defining function
def bmi(weight, height):
index = weight / (height * height)
return index #sends the return value back
#Calling function and using return value
patient_5 = bmi(61, 1.83) #stores return value
print(patient_5) #See the stored value in patient_5.
print("underweight:", patient_5 < 18.5)
#Another call
patient_7 = bmi(75, 1.74)
#see the new stored value
print (patient_7)
print("underweight:", patient_7 < 18.5)
#comment line 4 (return index)and see what happens.
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run