Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson17-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
e795ca57
authored
Aug 26, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
55ffd1a7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
1.txt
my_window.py
1.txt
View file @
e795ca57
小兰:12本小丽:11本小丽:11本
小丽:11本
小丽:11本
123,456,111456
111
python123
,123
,321
111
222
333
my_window.py
View file @
e795ca57
...
...
@@ -4,14 +4,13 @@ def register():
password1
=
d
.
get
()
password2
=
e
.
get
()
print
(
"用户输入的信息为:"
,
name
,
password1
,
password2
)
with
open
(
r'C:\Users\Lenovo\Documents\level3-lesson17-diy1
>
'
,
'a'
,
encoding
=
'utf-8'
)
as
file
:
file
.
write
(
'
%
d'
%
name
)
with
open
(
r'C:\Users\Lenovo\Documents\level3-lesson17-diy1
\1.txt
'
,
'a'
,
encoding
=
'utf-8'
)
as
file
:
file
.
write
(
'
%
s
\n
%
s
\n
%
s
\n
'
%
(
name
,
password1
,
password2
)
)
root
=
tkinter
.
Tk
()
screenwidth
=
root
.
winfo_screenwidth
()
screenheight
=
root
.
winfo_screenheight
()
a
=
(
screenwidth
-
300
)
/
2
b
=
(
screenheight
-
300
)
/
2
print
(
300
*
300
+
a
+
b
)
print
(
screenwidth
,
screenheight
)
root
.
title
(
"window"
)
root
.
geometry
(
"
%
dx
%
d+
%
d+
%
d"
%
(
400
,
320
,
a
,
b
))
...
...
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