From 7e9d8b94c28322848b3157a76d89e5d7e599edb6 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Fri, 5 Aug 2022 15:07:58 +0800 Subject: [PATCH] save project --- diy1.py | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/diy1.py b/diy1.py index 360080d..c3a7d03 100644 --- a/diy1.py +++ b/diy1.py @@ -1,13 +1,17 @@ -# 期末考试结束了,悟空在教务系统查到了自己的几门必修课分数,他想通过python计算自己的平均分。 -# 于是写了下面的代码,可是总是得不到结果,请帮纠正bug并跑通程序。 - -score = {'语文':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(score) \ No newline at end of file +import turtle +pen= turtle.Pen() +screen= turtle.Screen() +pen.speed(100) +pen.hideturtle() +screen.bgcolor('black') +i=0 +while i<135: + 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 -- libgit2 0.25.0