Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
41 lines (31 loc) · 715 Bytes

File metadata and controls

41 lines (31 loc) · 715 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""
if else 语句
"""
flag = True
if flag:
print("你没有危险物品")
print("if语句结束,缩进代表是不是和if为一体")
my_password = "12345"
if my_password == "12345":
print("密码正确")
else:
print("密码错误")
a = 10
b = 20
if a >= b:
print("a大于等于b")
else:
print("a不大于等于b")
"""
逻辑运算符:与或非, and or not
"""
my_name = "admin"
my_passwd = "12345"
if (my_name == "admin") and (my_passwd == "12345"):
print("登陆成功,用户名和密码都正确")
if (my_name != "admin") or (my_passwd != "12345"):
print("用户名或者密码错误")
is_man = False
is_woman = not True
if not is_man:
print("假男人")
Morty Proxy This is a proxified and sanitized view of the page, visit original site.