Commit abfecc97 by BellCodeEditor

auto save

parent 516730d1
Showing with 14 additions and 4 deletions
import ij
h=ij.new_input()
g=ij.count(h)
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=="a": if data=="a":
break break
...@@ -12,12 +12,15 @@ def new_input(): ...@@ -12,12 +12,15 @@ def new_input():
else: else:
total.append(data1) total.append(data1)
return total return total
result=new_input()
result1=new_input()
def count(list): def count(list):
a=0 a=0
for i in list: for i in list:
a=a+i a=a+i
print(a)
return a return a
result2=corunt(result1 )
result2=count(result1)
print(result2) print(result2)
\ No newline at end of file
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