Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson11_4
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
65509ef5
authored
May 09, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
dc70412a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
0 deletions
1.py
2.py
func.py
1.py
0 → 100644
View file @
65509ef5
i
=
3
a
=
"1"
b
=
"2"
while
True
:
if
i
>
0
:
c
=
input
(
"账号:"
)
d
=
input
(
"密码:"
)
i
-=
1
if
a
==
c
and
b
==
d
:
print
(
"输入正确"
)
break
if
a
!=
c
:
print
(
"没有这个账号"
)
print
(
"你还有"
,
str
(
i
),
"机会"
)
continue
if
b
!=
d
:
print
(
"密码错误"
)
print
(
"你还有"
,
str
(
i
),
"机会"
)
continue
else
:
print
(
"次数为零"
)
exit
()
print
(
"欢迎来到对抗路"
)
\ No newline at end of file
2.py
0 → 100644
View file @
65509ef5
a
=
input
(
"姓名:"
)
b
=
input
(
"成绩:"
)
c
=
input
(
"科目:"
)
print
(
a
,
"的"
,
c
,
"成绩是"
,
b
)
func.py
0 → 100644
View file @
65509ef5
def
pp
():
total
=
[]
while
True
:
unit
=
input
(
"请输入jilg gyuygtyu gyug yu fg fyfo bgu:"
)
if
unit
==
'q'
:
break
else
:
try
:
unit
=
int
(
unit
)
except
:
print
(
"qewfhgvedhadblu2gvhldcqrw"
)
else
:
total
.
append
(
unit
)
return
total
def
qh
(
t
):
count
=
0
for
i
in
t
:
count
+=
i
return
count
s
=
pp
()
k
=
qh
(
s
)
print
(
k
)
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