Commit 50c826a3 by BellCodeEditor

auto save

parent e407c244
Showing with 24 additions and 4 deletions
...@@ -3,12 +3,14 @@ ...@@ -3,12 +3,14 @@
scores = {'语文':89, '数学':95, '英语':80} scores = {'语文':89, '数学':95, '英语':80}
def get_average(scores): def get_average(b):
i=0
score = 0 score = 0
for subject, score in scores.items(): for subject, i in b.items():
score += score
score = score+i
print('现在的总分是%d'%score) print('现在的总分是%d'%score)
ave_score = score/len(scores) ave_score = score/len(b)
print('平均分是%d'%ave_score) print('平均分是%d'%ave_score)
get_average(scores) get_average(scores)
\ No newline at end of file
import turtle
pen=turtle.Pen()
pen.pensize(1)
for i in range(4):
pen.forward(100)
pen.left(90)
pen.up()
pen.left(45)
pen.forward(50)
pen.pensize(7)
pen.right(45)
for i in range(3):
pen.down()
pen.forward(1)
pen.up()
pen.forward(10)
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