Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson18-diy1
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
2b32572c
authored
Jun 16, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
145fe74a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
2 deletions
1.py
2.py
3.py
my_app.py
1.py
0 → 100644
View file @
2b32572c
import
turtle
a
=
int
(
turtle
.
textinput
(
"提示"
,
"输入大小:"
))
turtle
.
color
(
"red"
)
turtle
.
begin_fill
()
turtle
.
left
(
45
)
turtle
.
forward
(
2
*
a
)
turtle
.
circle
(
a
,
180
)
turtle
.
right
(
90
)
turtle
.
circle
(
a
,
180
)
turtle
.
forward
(
2
*
a
)
turtle
.
end_fill
()
turtle
.
bgcolor
(
"black"
)
turtle
.
penup
()
turtle
.
goto
(
100
,
-
100
)
turtle
.
write
(
"你好!"
,
font
=
(
"黑体"
,
40
,
"bold"
))
turtle
.
hideturtle
()
turtle
.
done
()
2.py
0 → 100644
View file @
2b32572c
import
random
a
=
input
(
"输入拳:"
)
b
=
[
"石头"
,
"剪刀"
,
"布"
]
computer
=
random
.
choice
(
b
)
print
(
computer
)
if
a
in
b
:
if
a
==
computer
:
print
(
"平局"
)
elif
a
==
"石头"
and
computer
==
"剪刀"
or
a
==
"剪刀"
and
computer
==
"布"
\
or
a
==
"布"
and
computer
==
"石头"
:
print
(
"我胜了!"
)
else
:
print
(
"我输了!"
)
else
:
print
(
"输入错误!"
)
\ No newline at end of file
3.py
0 → 100644
View file @
2b32572c
n
,
m
=
map
(
int
,
input
()
.
split
())
wi
=
[
-
1
]
vi
=
[
-
1
]
for
i
in
range
(
n
):
a
,
b
=
map
(
int
,
input
()
.
split
())
wi
.
append
(
a
)
vi
.
append
(
b
)
dp
=
[[
0
for
i
in
range
(
m
+
1
)]
for
j
in
range
(
n
+
1
)]
for
i
in
range
(
1
,
n
+
1
):
for
j
in
range
(
1
,
m
+
1
):
if
j
<
wi
[
i
]:
dp
[
i
][
j
]
=
dp
[
i
-
1
][
j
]
else
:
dp
[
i
][
j
]
=
max
(
dp
[
i
-
1
][
j
],
dp
[
i
-
1
][
j
-
wi
[
i
]]
+
vi
[
i
])
my_app.py
View file @
2b32572c
import
tkinter
def
login_to_reg
():
# 登录界面转注册界面
pass
app_login
.
root
.
destroy
()
global
app_register
app_register
=
My_register
()
app_register
.
show
()
def
reg_to_login
():
# 注册界面转登录界面
pass
app_login
.
root
.
destroy
()
global
app_register
app_register
=
My_register
()
app_register
.
show
()
def
register
():
# 注册验证
pass
...
...
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