事例1
mood = False
if mood:
print('go to left')
else:
print('go to right')
事例2
ACCOUNT = 'qiyue'
PASSWORD = '123456'
print('please input account')
user_account = input()
print('please input password')
user_password = input()
if user_account == ACCOUNT and user_password == PASSWORD:
print('success')
else:
print('fail')
事例3
a = input()
print('a is ' + a)
a = int(a)
if a == 1:
print('apple')
elif a == 2:
print('orange')
elif a == 3:
print('banan')
else:
print('go shopping')
事例4
a = 1
b = 0
print(bool(a or b))
点击查看更多内容
为 TA 点赞
评论
共同学习,写下你的评论
评论加载中...
作者其他优质文章
正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦