#! /usr/bin/python
#* coding: utf-8 *
age = int(input("input your age: "))
if age >= 50:
print('old')
elif age >= 25:
print ('adult')
elif age >=6:
print('teenager')
else:
print('kid')
#! /usr/bin/python
#* coding: utf-8 *
age = int(input("input your age: "))
if age >= 50:
print('old')
elif age >= 25:
print ('adult')
elif age >=6:
print('teenager')
else:
print('kid')
1.while循環的格式 while 條件: 條件滿足時,做的事情1 條件滿足時,做的事情2 條件滿足時,做的事情3 ...(省略)... demo