Commit b699517d by BellCodeEditor

auto save

parent abf7e3b5
Showing with 67 additions and 14 deletions
# 期末考试结束了,悟空在教务系统查到了自己的几门必修课分数,他想通过python计算自己的平均分。
# 于是写了下面的代码,可是总是得不到结果,请帮纠正bug并跑通程序。
'''a=6#长方形的长
b=3#长方形的宽
s=int(b*a)#计算面积
print("长方形的面积为"+str(s))#打印面积'''
"""import turtle
pen=turtle.Pen()
pen.fillcolor('yellow')
pen.begin_fill()
pen.forward(180)
pen.left(90)
pen.forward(180)
pen.goto(0,0)
pen.end_fill()
pen.fillcolor("red")
pen.begin_fill()
pen.forward(180)
pen.left(-90)
pen.forward(180)
pen.end_fill()
turtle.done()"""
'''import turtle
pen=turtle.Pen()
pen.forward(100)
pen.left(180)
pen.forward(200)
pen.left(90)
pen.circle(100)
pen.left(90)
pen.forward(100)
pen.left(90)
pen.forward(100)
pen.left(180)
pen.forward(200)
turtle.done'''
"""x=input("总秒数?")
y=int(x)//60
z=int(y)//60
a=int(x)-60*int(y)
b=int(y)-60*int(z)
print(str(z)+"时"+str(b)+"分"+str(a)+"秒")"""
scores = {'语文':89, '数学':95, '英语':80}
subject=0
def get_average(scores):
i=0
score = 0
for i in scores.values():
score += i
ave_score = score/len(scores)
print('现在的总分是%d'%score)
print('平均分是%d'%ave_score)
get_average(scores)
\ No newline at end of file
m=input("总秒数?")
m1=int(m/60)+int(m/360)
print(str(mi))
\ 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