Commit e9ad662d by BellCodeEditor

auto save

parent 6f14f60b
Showing with 45 additions and 0 deletions
...@@ -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=' ') #依次告诉客人今天的各类菜有哪些选择
......
# 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment