Commit 5c51c988 by BellCodeEditor

auto save

parent c7ce0a88
def func1():
list=[]
while True:
a=input("输入")
list.append(int(a))
if(a=='q'):
break
return list
a=func1()
def func2(list):
sum=0
\ No newline at end of file
......@@ -11,21 +11,19 @@ def new_input():
print("请重新输入一个数字")
else:
total.append(unit)
finally:
print("=====================")
return total
c=new_input()
print(c)
# c=new_input()
# print(c)
def func(list):
sum=0
for i in list:
sum=sum+i
return sum
d=func(c)
print(d)
# d=func(c)
# print(d)
# print("您一共消费了" + str(pay) + "元!扫码还是现金呢?")
# print("您一共消费了" + str(d) + "元!扫码还是现金呢?")
# 定义函数:
# def 函数名():
......
......@@ -5,6 +5,6 @@ def func():
def func1(a,b):
c=a+b
return c
d=func()
e =func1(3,4)
print(e)
def func2(c):
return c
print(1111)
import test,test1
# n=test.new_input()
# m=test.func(n)
# print("分数为"+str(m)+"分")
a=test1.func()
b=test1.func1(a,5)
c=test1.func2(b)
print(a,b,c)
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