Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson10-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
fa21543b
authored
Oct 29, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
9c4fa246
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
0 deletions
1.py
4.py
9.py
area.py
b.py
s.py
1.py
0 → 100644
View file @
fa21543b
4.py
0 → 100644
View file @
fa21543b
import
turtle
pen
=
turtle
.
Pen
()
screen
=
turtle
.
Screen
()
pen
.
speed
(
1000
)
pen
.
hideturtle
()
screen
.
bgcolor
(
'black'
)
i
=
0
while
i
<
135
:
pen
.
pencolor
(
'blue'
)
pen
.
penup
()
pen
.
goto
(
0
,
0
)
pen
.
forward
(
200
)
pen
.
pendown
()
pen
.
circle
(
100
)
pen
.
left
(
2
)
i
+=
1
turtle
.
done
()
\ No newline at end of file
9.py
0 → 100644
View file @
fa21543b
scores
=
{
'一'
:
76
,
'二'
:
94
,
'三'
:
95
}
def
get_average
(
scores
):
sum_score
=
0
for
subject
,
score
in
scores
.
items
():
sum_score
+=
score
print
(
'现在的总分是
%
d'
%
sum_score
)
ave_score
=
sum_score
/
len
(
scores
)
print
(
'平均分是
%
d'
%
ave_score
)
get_average
(
scores
)
\ No newline at end of file
area.py
View file @
fa21543b
# 假期到了,诺依想出去玩,但不知道有没有飞机直达那里,
# 悟空做了个小程序帮助诺依,然而代码出现了3处错误。
# 请你找出来,并运行~
...
...
b.py
0 → 100644
View file @
fa21543b
stonenumber
=
4
if
stonenumber
>=
4
:
print
(
'经济领先,稳了!'
)
elif
1
<=
stonenumber
<=
3
:
print
(
'八嘎,快死了,买反甲!'
)
else
:
print
(
'嘤嘤嘤,大意了,兄弟们投吧!bi~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
)
\ No newline at end of file
s.py
0 → 100644
View file @
fa21543b
city
=
[
'New York'
,
'Luoyang'
,
''
,
'洛杉矶'
,
'芝加哥'
,
'旧金山'
]
area
=
input
(
'Where are you go?'
)
if
area
in
city
:
print
(
'You can go there by plane.'
)
else
:
print
(
'There not have the city.'
)
\ 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