Commit 2a926105 by BellCodeEditor

auto save

parent dc70412a
Showing with 31 additions and 0 deletions
def new_input():
total = []
while True:
money= input("请输入:")
if money == 'q':
break
else:
try:
money=int(money)
except:
print("应输入整数")
else:
total.append(money)
return total
def abc(list1):
count=0
for i in range(list1):
count+= i
return count
result=new_input()
pay=abc(result)
print("一共需要付",pay,"元")
\ No newline at end of file
def func(x,y):
if x>y:
return x
else:
return y
z=func(3,5)
print(z)
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