Commit 6f6abbde by BellCodeEditor

save project

parent eaeaab43
Showing with 11 additions and 9 deletions
total = [] def new_input():
while True: total = []
unit= input("请输入:") while True:
unit= input("请输入:")
if unit== 'q': if unit== 'q':
break break
else: else:
try: try:
unit=int(unit) unit=int(unit)
...@@ -15,8 +16,8 @@ while True: ...@@ -15,8 +16,8 @@ while True:
return total return total
result = new_input() result = new_input()
print(result) print(result)
sum = 0 #sum = 0
for i in result: #for i in result:
sum sum+result[i] # sum sum+result[i]
print(sum) #print(sum)
\ 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