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
b929c43b
authored
Nov 19, 2020
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
e9ad662d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
3 deletions
1.py
2.py
3.py
area.py
1.py
View file @
b929c43b
...
@@ -9,7 +9,6 @@ today_menu={'前菜':{'熏鲢鱼':20,'生蚝':20,'面包':10},
...
@@ -9,7 +9,6 @@ today_menu={'前菜':{'熏鲢鱼':20,'生蚝':20,'面包':10},
'甜品'
:{
'可丽露'
:
20
,
'优格吐司'
:
15
,
'蓝莓松饼'
:
20
}
'甜品'
:{
'可丽露'
:
20
,
'优格吐司'
:
15
,
'蓝莓松饼'
:
20
}
}
}
for
k
,
v
in
today_menu
.
items
():
for
k
,
v
in
today_menu
.
items
():
# print(k,v)
print
(
'今日'
+
k
+
'有:'
)
print
(
'今日'
+
k
+
'有:'
)
for
i
in
v
:
for
i
in
v
:
print
(
i
,
end
=
' '
)
#依次告诉客人今天的各类菜有哪些选择
print
(
i
,
end
=
' '
)
#依次告诉客人今天的各类菜有哪些选择
...
...
2.py
View file @
b929c43b
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
import
turtle
import
turtle
pen
=
turtle
.
Pen
()
pen
=
turtle
.
Pen
()
screen
=
turtle
.
Screen
()
screen
=
turtle
.
Screen
()
pen
.
speed
(
1000
)
pen
.
speed
(
'fast'
)
pen
.
hideturtle
()
pen
.
hideturtle
()
screen
.
bgcolor
(
'black'
)
screen
.
bgcolor
(
'black'
)
i
=
0
i
=
0
...
...
3.py
0 → 100644
View file @
b929c43b
scores
=
{
'语文'
:
89
,
'数学'
:
95
,
'英语'
:
80
}
def
get_average
(
scores
):
score
=
0
for
subject
,
score
in
scores
.
items
():
score
+=
score
print
(
'现在的总分是
%
d'
%
score
)
ave_score
=
score
/
len
(
scores
)
print
(
'平均分是
%
d'
%
ave_score
)
get_average
(
scores
)
\ No newline at end of file
area.py
View file @
b929c43b
...
@@ -64,7 +64,6 @@ def get_average(scores):
...
@@ -64,7 +64,6 @@ def get_average(scores):
print('
现在的总分是
%
d
'
%
score)
print('
现在的总分是
%
d
'
%
score)
ave_score = score/len(scores)
ave_score = score/len(scores)
print('
平均分是
%
d
'
%
ave_score)
print('
平均分是
%
d
'
%
ave_score)
get_average(scores)
get_average(scores)
...
...
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