Commit c5e01dc6 by BellCodeEditor

save project

parent e1ac9bbd
with open(r'C:\Users\Administrator\Desktop\test.txt','a',encoding='utf-8') as file1:
file1.write('小力:12本\n')
s=0
while True:
sum=input("输入数字,退出'q'请按")
if sum=="q":
break
else:
try:
new_sum=int(sum)
except:
print("输入正确数字")
else:
s=s+new_sum
print(s)
def sum(a):
s=0
for i in range(a+1):
s=s+i
return s
finsh=sum(3)
print(finsh)
def max(x,y):
if x>y:
return x
else:
return y
finsh=max(3,5)
print(finsh)
\ No newline at end of file
file1=open(r'C:\Users\Administrator\Desktop\aa.txt','w',encoding='utf-8')
file1=open(r'C:\Users\Administrator\Desktop\aa.txt','w',encoding='utf-8')
\ No newline at end of file
def sum(x,y):
def sum(x,y):
s=x+y
return s
finsh=sum(3,5)
print(finsh)
\ No newline at end of file
import turtle
import turtle
def box():
t=turtle.Pen()
for i in range(4):
t.forward(100)
t.left(90)
box()
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