Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson4_6
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1f5ae90c
authored
Mar 05, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
b810c294
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
0 deletions
diy2.py
wd.py
diy2.py
0 → 100644
View file @
1f5ae90c
a
=
'python'
b
=
'12345'
e
=
0
while
e
<
3
:
c
=
input
(
"请输入用户名:"
)
d
=
input
(
"请输入密码:"
)
if
a
==
c
and
b
==
d
:
print
(
"登录成功"
)
e
+=
3
elif
a
!=
c
and
b
==
d
:
print
(
"用户名错误"
)
e
+=
1
elif
a
==
c
and
b
!=
d
:
print
(
"密码错误"
)
e
+=
1
else
:
print
(
"该账号不存在"
)
e
+=
1
print
(
"账号封锁中"
)
print
(
"账号已封锁"
)
#print("自爆准备")
#print("程序删除中")
#print("删除完毕")
#print(3)
#print(2)
#print(1)
#print(0)
#print("Boom!!!")
\ No newline at end of file
wd.py
0 → 100644
View file @
1f5ae90c
#在控制台输入input要换算的人民币,打印出卢布 print(人民币和卢布的换算) 人民币 :卢布 =1:10.4
#rate_exchange = int(input('请输入人民币:'))
#count= rate_exchange * 10.4
#print('换算成卢布为:'+str(count)
#在控制台输入商品的名称 输出 价格 (可口可乐 4 百事 4 薯片 6 ) if ---elif-- else
# goods=input('请输入商品名称:')
# if goods == '可口可乐' or goods=='百事':
# print('4元')
# elif goods=='薯片':
# print('6元')
# else:
# print('没有货物')
#
#输入一个年份 计算是否是闰年 如果年份能整除100 年份除400
# years=int(input('请输入年份:'))
# if years % 100 ==0 and years % 400==0:
# print('是闰年')
# elif years % 100 != 0 and years % 4 ==0 :
# print('是闰年')
# else:
# print('不是')
a
=
"python"
b
=
"123456"
e
=
0
i
=
3
while
e
<
3
:
c
=
input
(
"请输入用户名: "
)
d
=
input
(
"请输入密码: "
)
if
a
==
c
and
b
==
d
:
print
(
"登录成功"
)
print
(
"欢迎来到贝尔编辑器"
)
break
elif
a
!=
c
and
b
==
d
:
print
(
"用户名错误"
)
e
+=
1
i
-=
1
print
(
"还可登录{i}次"
)
elif
a
==
c
and
b
!=
d
:
print
(
"密码错误"
)
e
+=
1
i
-=
1
print
(
"还可登录{i}次"
)
else
:
print
(
"该账号不存在"
)
e
+=
1
i
-=
1
print
(
"还可登录{i}次"
)
print
(
"账号封锁中"
)
print
(
"账号已封锁"
)
# print("请三分钟后尝试")
# print("自爆准备")
# print("程序删除中")
# print("删除完毕")
# print(3)
# print(2)
# print(1)
# print(0)
# print("Boom!!!")
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment