Commit 4edb0ec9 by BellCodeEditor

save project

parent 7833d65c
Showing with 16 additions and 14 deletions
import z
h=z.new_input()
g=z.count(ch)
print("成绩是"+str(g))
\ No newline at end of file
def new_input def new_input():
total=[] total=[]
while true: while True:
data=input("请输入价格") data=input("请输入价格")
if data="p" if data=="q":
brake break
else: else:
try: try:
data1=int(data) data1=int(data)
except: except:
print("请输入数字") print("请输入数字")
else: else:
total.appemd(data1) total.append(data1)
print(tota1) return total
return tota1
a=new_input() result1=new_input()
print(a) #print(result1)
result=new_input() def count(list):
print(result1)
def count(list)
a=0 a=0
for i in list: for i in list:
a=a+i a=a+i
print(a) #print("价格总和是"+str(a))
return a return a
result2=count(result1) result2=count(result1)
......
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