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
e9ad662d
authored
Nov 01, 2020
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
6f14f60b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
0 deletions
1.py
2.py
1.py
View file @
e9ad662d
...
@@ -9,6 +9,7 @@ today_menu={'前菜':{'熏鲢鱼':20,'生蚝':20,'面包':10},
...
@@ -9,6 +9,7 @@ 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
0 → 100644
View file @
e9ad662d
# stonenumber=5
# if stonenumber >= 4:
# print('获得了打败灭霸的力量,反杀稳了')
# elif 1<=stonenumber <= 3:
# print('可以全员出动,殊死一搏')
# else:
# print('没办法了,只能尝试呼叫惊奇队长')
# # 期末考试结束了,悟空在教务系统查到了自己的几门必修课分数,他想通过python计算自己的平均分。
# # 于是写了下面的代码,可是总是得不到结果,请帮纠正bug并跑通程序。
# scores = {'语文':89, '数学':95, '英语':80}
# def get_average(scores):
# score = 0
# for subject, score1 in scores.items():
# score += score1
# print('现在的总分是%d'%score)
# ave_score = score/len(scores)
# print('平均分是%d'%ave_score)
# get_average(scores)
# 悟空想海龟作图画出弹簧隧道,但是出现了bug,运行不了,请你帮助他,修改bug
import
turtle
pen
=
turtle
.
Pen
()
screen
=
turtle
.
Screen
()
pen
.
speed
(
1000
)
pen
.
hideturtle
()
screen
.
bgcolor
(
'black'
)
i
=
0
while
i
<
135
:
pen
.
speed
(
1000
)
pen
.
pencolor
(
'pink'
)
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
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