Commit 3388cbaa by BellCodeEditor

save project

parent 8b72b5e0
Showing with 31 additions and 19 deletions
def add (x,y): def add(x,y):
z = x + y w=x+y
print("z的值为:",z) print(w)
#return z #return (w)
\ No newline at end of file add(8,7)
\ No newline at end of file
z=[] def new():
while True: z=[]
a=int(input("输入价格")) while True:
if a=="stop": a=input("输入价格:")
break if a=="stop":
else: break
try:
a1=int(a)
except:
print("输入数字")
else: else:
z.append(a1) try:
a1=int(a)
except:
print("请输入数字")
else:
z.append(a1)
print(z) print(z)
return(z)
new() h=new()
\ No newline at end of file print(z)
\ No newline at end of file
import turtle
pen=turtle.Pen()
d=1
for i in range(300):
pen.forward(d)
pen.left(91)
d=d+1
pen.hideturtle()
turtle.done()
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