condition练习
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
age=17
if age>=18:
print('your age is',age)
print('adult')
elif age>=6:
print('your age is',age)
print('teenager')
else:
print('your age is',age)
print('kid')
# s = input('birth:')
# birth = int(s)
# if birth < 2000:
# print('00前')
# else:
# print('00后')
height = 1.72
weight = 73
bmi = weight/(height*height)
print('bmi is: %.1f' % bmi)
if bmi<18.5:
print('过轻')
elif bmi>=18.5 and bmi<25:
print('正常')
elif bmi>=25 and bmi<28:
print('过重')
elif bmi>=28 and bmi<32:
print('肥胖')
else:
print('严重肥胖')