1、 if: elif: else:
age = 3
if age >= 18:
print('adult')
elif age >= 6:
print('teenager')
else:
print('kid')
2、input()
choice = input('请输入您的选择:')
3、类型转换
int()、str()、float()
1、 if: elif: else:
age = 3
if age >= 18:
print('adult')
elif age >= 6:
print('teenager')
else:
print('kid')
2、input()
choice = input('请输入您的选择:')
3、类型转换
int()、str()、float()
本文标题:python语法语句
本文链接:https://www.haomeiwen.com/subject/pppshqtx.html
网友评论