Lesson 61 Python中的逻辑运算符号
1. 逻辑运算符号:and
1 and 2
- 两个条件同时满足 就返回True
- 只要有一个条件不满足,就返回False
python_score = 60
c_score = 50
if python_score >= 60 and c_score >=60:
print('考试通过')
else:
print('考试不通过')
2. 逻辑运算符号:or
1 or 2
- 两个条件只要满足一个 就返回True
- 两个条件都不满足,就返回False
python_score = 60
c_score = 50
if python_score >= 60 or c_score >=60:
print('考试通过')
else:
print('考试不通过')