Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson15_2_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
2f1305c2
authored
Dec 08, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
05576102
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
80 additions
and
1 deletions
2.py
3.py
4.py
5.py
6.py
7.py
8.py
diy2.py
2.py
0 → 100644
View file @
2f1305c2
from
turtle
import
*
q
=
[
"red"
,
"orange"
,
"yellow"
,
"green"
,
"blue"
,
"purple"
,
"darkorchid"
]
for
i
in
range
(
7
):
fillcolor
(
q
[
i
])
begin_fill
()
circle
(
50
)
end_fill
()
left
(
360
/
7
)
done
()
hideturtle
()
3.py
0 → 100644
View file @
2f1305c2
from
turtle
import
*
pencolor
(
"pink"
)
fillcolor
(
"blue"
)
begin_fill
()
for
i
in
range
(
8
):
circle
(
100
,
90
)
left
(
135
)
end_fill
()
done
()
4.py
0 → 100644
View file @
2f1305c2
from
turtle
import
*
pencolor
(
"pink"
)
fillcolor
(
"blue"
)
begin_fill
()
for
i
in
range
(
8
):
circle
(
50
,
120
)
left
(
105
)
end_fill
()
done
()
5.py
0 → 100644
View file @
2f1305c2
from
turtle
import
*
for
i
in
range
(
6
):
fd
(
50
)
right
(
60
)
left
(
120
)
for
j
in
range
(
6
):
for
i
in
range
(
5
):
fd
(
50
)
right
(
60
)
right
(
120
)
done
()
6.py
0 → 100644
View file @
2f1305c2
w
=
int
(
input
(
"你的语文成绩是多少?"
))
e
=
int
(
input
(
"你的数字成绩是多少?"
))
r
=
int
(
input
(
"你的英语成绩是多少?"
))
print
(
"你的总分为:"
,
w
+
e
+
r
,
"平均分为:"
,(
w
+
e
+
r
)
/
3
)
\ No newline at end of file
7.py
0 → 100644
View file @
2f1305c2
from
turtle
import
*
right
(
180
)
fd
(
50
)
left
(
90
)
circle
(
50
,
360
)
left
(
90
)
fd
(
100
)
left
(
90
)
circle
(
50
,
90
)
left
(
90
)
fd
(
100
)
hideturtle
()
done
()
8.py
0 → 100644
View file @
2f1305c2
class
Person
:
def
__init__
(
self
,
name
,
age
):
self
.
name
=
name
self
.
age
=
age
class
Teacher
(
Person
):
def
__init__
(
self
,
name
,
age
,
subject
):
self
.
subject
=
subject
super
()
.
__init__
(
name
,
age
)
def
skill
(
self
):
print
(
self
.
subject
)
qq
=
Teacher
(
"ww"
,
11
,
"ee"
)
qq
.
skill
()
\ No newline at end of file
diy2.py
View file @
2f1305c2
import
random
class
Hero
:
# 英雄类
def
__init__
(
self
,
name
):
# 实例属性
self
.
name
=
name
...
...
@@ -43,5 +44,11 @@ print("-"*30)
print
(
" 开始战斗"
)
while
True
:
print
(
"-"
*
30
)
print
(
"请选择释放英雄技能(1攻击/2治疗):"
)
a
=
input
(
"请选择释放英雄技能(1攻击/2治疗):"
)
if
a
==
"q"
:
print
(
"结束战斗"
)
break
eilf
a
==
"1"
:
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