Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson13-1
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
fcbc7495
authored
Oct 27, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
5ec53ebb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
0 deletions
ce1.py
cep.py
diy.py
zhouri.py
ce1.py
0 → 100644
View file @
fcbc7495
import
turtle
screen
=
turtle
.
Screen
()
screen
.
textinput
(
"姓名框"
,
"请输入你的名字:"
)
turtle
.
done
()
\ No newline at end of file
cep.py
0 → 100644
View file @
fcbc7495
import
turtle
pen
=
turtle
.
Pen
()
screen
=
turtle
.
Screen
()
screen
.
bgcolor
(
"pink"
)
pen
.
pensize
(
5
)
pen
.
pencolor
(
"red"
)
len
=
50
pen
.
left
(
45
)
pen
.
forward
(
len
*
2
)
pen
.
circle
(
len
,
180
)
pen
.
right
(
90
)
pen
.
circle
(
50
,
180
)
pen
.
forward
(
100
)
pen
.
penup
()
pen
.
goto
(
100
,
-
100
)
pen
.
write
(
"诺依
\n
turtle真好用
\n
我会用turtle写字了!"
,
font
=
(
"Times"
,
20
,
"normal"
))
pen
.
hideturtle
()
turtle
.
done
()
\ No newline at end of file
diy.py
View file @
fcbc7495
with
open
(
r'C:\Users\Yuanl\Documents\lesson13-1\sales_list.txt'
,
'r'
,
encoding
=
'utf-8'
)
as
file1
:
a
=
file1
.
readlines
()
list1
=
[]
for
i
in
a
:
new_txt
=
i
.
split
()
# print(new_txt[1:])
sum
=
0
for
s
in
new_txt
[
1
:]:
sum
=
sum
+
int
(
s
)
text
=
new_txt
[
0
]
+
":"
+
str
(
sum
)
+
"
\n
"
list1
.
append
(
text
)
with
open
(
r'C:\Users\Yuanl\Desktop\hello.txt'
,
'w'
,
encoding
=
'utf-8'
)
as
file1
:
file1
.
writelines
(
list1
)
zhouri.py
0 → 100644
View file @
fcbc7495
import
turtle
screen
=
turtle
.
Screen
()
pen
=
turtle
.
Pen
()
a
=
float
(
screen
.
textinput
(
"爱心框"
,
"请输入爱心大小:"
))
screen
.
bgcolor
(
"pink"
)
pen
.
write
(
"诺依
\n
turtle真好用
\n
我会用turtle写字了!"
,
font
=
(
"Times"
,
20
,
"normal"
))
pen
.
penup
()
pen
.
goto
(
-
100
,
100
)
pen
.
pendown
()
pen
.
pensize
(
10
)
pen
.
pencolor
(
"red"
)
pen
.
left
(
45
)
pen
.
forward
(
2
*
a
)
pen
.
circle
(
a
,
180
)
pen
.
right
(
90
)
pen
.
circle
(
a
,
180
)
pen
.
forward
(
2
*
a
)
pen
.
hideturtle
()
turtle
.
done
()
\ No newline at end of file
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