Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson20-diy2
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
383f7ede
authored
Jun 25, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
1f9923e5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
5 deletions
demo.py
my_client.py
quiz.py
demo.py
0 → 100644
View file @
383f7ede
for
i
in
range
(
101
):
if
i
%
3
==
0
:
print
(
i
,
end
=
' '
)
if
i
%
5
==
0
:
print
(
i
,
end
=
' '
)
if
i
%
15
==
0
:
print
(
i
,
end
=
' '
)
# for i in range(15,101):
# if i%3==0:
# print(i,end=' ')
my_client.py
View file @
383f7ede
...
...
@@ -11,7 +11,7 @@ class Note(): # 便签、笔记
self
.
root
.
title
(
"我的便签-待办事项"
)
self
.
root
.
resizable
(
width
=
False
,
height
=
False
)
self
.
bg_img
=
tkinter
.
PhotoImage
(
file
=
"bg.png"
)
self
.
box
=
tkinter
.
PhotoImage
(
file
=
'box.png'
)
self
.
box
=
tkinter
.
PhotoImage
(
file
=
'box.png'
)
#载入背景资源
def
show
(
self
):
# 布置窗口界面
# 画布
...
...
@@ -38,9 +38,9 @@ class Note(): # 便签、笔记
borderwidth
=
0
,
command
=
self
.
remove
)
self
.
select
.
place
(
x
=-
20
,
y
=
self
.
y
-
10
)
self
.
val
+=
1
self
.
y
+=
30
self
.
y
+=
30
#创建文字框
def
remove
(
self
):
def
remove
(
self
):
#点击方框后删除那一行
num
=
self
.
v
.
get
()
alist
.
pop
(
num
)
self
.
canvas
.
destroy
()
...
...
@@ -55,7 +55,6 @@ class Note(): # 便签、笔记
anchor
=
W
,
fill
=
'#FF9900'
)
self
.
y
+=
30
app
=
Note
()
app
.
show
()
app
.
root
.
mainloop
()
...
...
quiz.py
View file @
383f7ede
...
...
@@ -4,7 +4,7 @@ root = tkinter.Tk()
root
.
geometry
(
'300x340+500+200'
)
canvas
=
tkinter
.
Canvas
(
root
,
width
=
300
,
height
=
340
,
bg
=
"lightblue"
)
canvas
.
place
(
x
=
0
,
y
=
0
)
#
++++++++++++++++++++++++++++++++++++++++++++++++++++
#++++++++++++++++++++++++++++++++++++++++++++++++++++
def
func
():
num
=
v
.
get
()
print
(
"你选择了:"
,
num
)
...
...
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