Commit e820b454 by BellCodeEditor

auto save

parent dd181fda
Showing with 23 additions and 12 deletions
def total(z):
q=0
def total():
z=[]
while True:
a=input("输入价格:")
if a=="s":
break
else:
try:
a1=int(a)
except:
print("请输入数字")
else:
z.append(a1)
s=0
for i in z:
q=q+i
print(q)
return(q)
d=total(we=[1,2,3,4])
print(d)
\ No newline at end of file
s=s+i
print(s)
total()
\ No newline at end of file
import func
total1=func.a()
suan=func.total(total1)
for j in range(1,10):
for i in range(1,j+1):
print(i,"*",j,"=",i*j,sep="",end=" ")
print()
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