Commit 4dba8b9d by BellCodeEditor

save project

parent 9ade0ff7
Showing with 25 additions and 25 deletions
import turtle
Pen=turtle.Pen()
Pen.write("你好呀!\n,我在玛酷学编程\n,快来一起来学习吧!\n,",font=("Times",30,"normal"))
Pen.hideturtle()
Pen.write("你好呀!\n我在玛酷学编程,\n快来一起来学习吧!\n ",font=("Times",30,"normal"))
Pen1=turtle.Pen()
screen=turtle.Screen()
len=screen.textinput("xx","大小")
Pen1.penup()
Pen1.goto(-150,0)
lovly=int(len)
Pen1.pensize(5)
Pen1.pencolor("red")
Pen1.left(45)
Pen1.pendown()
Pen1.forward(2*lovly)
Pen1.circle(lovly,180)
Pen1.right(90)
Pen1.circle(lovly,180)
Pen1.forward(2*lovly)
Pen1.hideturtle()
turtle.done()
\ No newline at end of file
import turtle
screen=turtle.Screen()
screen.textinput("姓名框","名字:")
turtle.done()
\ No newline at end of file
def e():
total = []
while True:
unit= input("请输入这位选手的分数:")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print("请重新输入分数:")
else:
total.append(unit)
print("-"*30)
return total
result=e()
print(result)
sum=0
a=0
for i in range(len(result)):
sum=sum+result[i]
print("这位选手的分数是"+str(sum))
\ 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