Commit bb88d6ca by BellCodeEditor

auto save

parent c20f0945
Showing with 28 additions and 0 deletions
import turtle
pen = turtle.Pen()
i=1
pen.speed(200)
for i in range(300):
pen.forward(i+1)
pen.right(91)
pen.hideturtle()
turtle.done()
\ No newline at end of file
def new_input():
def new_input():
a=0
while True:
unit=input("请输入数字")
if unit=="q":
break
else:
try:
b=int(unit)
except:
print("请输入整数")
else:
a=a+b
return a
c=new_input()
print(c)
\ 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