Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson5_5
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
61163cfd
authored
Jun 18, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
a99fa455
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
1.csv
diy2.py
scores.csv
1.csv
0 → 100644
View file @
61163cfd
from tkinter import filedialog , Tk
path = filedialong.askopenfilenames(title="选择图片文件",filetypes=""
diy2.py
View file @
61163cfd
# -*- coding: UTF-8 -*-
for
i
in
range
(
1
,
10
):
import
csv
for
j
in
range
(
1
,
i
+
1
):
subject
=
[
"姓名"
,
"功绩"
,
"寿命"
,
"影响"
]
score1
=
[
"列宁"
,
"S"
,
"A"
,
"S"
]
print
(
j
,
'*'
,
i
,
'='
,(
j
*
i
),
end
=
" "
)
score2
=
[
"斯大林"
,
"A"
,
"A"
,
"S"
]
print
()
with
open
(
"scores.csv"
,
"w"
,
encoding
=
"utf-8"
)
as
file
:
writer
=
csv
.
writer
(
file
)
writer
.
writerow
(
subject
)
writer
.
writerow
(
score1
)
writer
.
writerow
(
score2
)
\ No newline at end of file
scores.csv
0 → 100644
View file @
61163cfd
姓名,功绩,寿命,影响
列宁,S,A,S
斯大林,A,A,S
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