Day 3 Python Session - Colaboratory
Day 3 Python Session - Colaboratory
# Program to calculate the BMI and specify whether they are Undeweight(<=20) ,Normal(21-25),Overweight(26-30) and Obsese(>30
height=float(input("Enter your height in meters"))
weight=float(input("Enter your weight in kg"))
bmi=weight/height**2
if bmi<=20:
status="Underweight"
elif (bmi>=21 and bmi<=25):
status="Normal"
elif (bmi>=26 and bmi<=30):
status="Overweight"
else:
status="Obese"
print(f'Hello, Your BMI is {round(bmi,2)}')
print(f" You are {status}!!!")
1
1
2
3
5
8
13
21
34
Enter a number5
Factorial of 5 is 120
a,b,c=10,20,30
a,b=b,a+b
print(a,b)
20 30
30 10
https://colab.research.google.com/drive/1ivNDRSaOHSk4Up5HHw3HGYyZYMU1Mjw4#scrollTo=_UNbzVqynK1c&printMode=true 1/2
4/21/23, 12:50 PM Day 3 Python Session - Colaboratory
https://colab.research.google.com/drive/1ivNDRSaOHSk4Up5HHw3HGYyZYMU1Mjw4#scrollTo=_UNbzVqynK1c&printMode=true 2/2