Commit 1570e3eb by BellCodeEditor

save project

parent eb3fd469
Showing with 14 additions and 10 deletions
with open(r'C:\users\CM\Documents\lesson13-2','r,encoding='utf-8')as file1
with open(r'C:\users\CM\Documents\lesson13-2','r,encoding='utf-8')as file1
a=file1.readliens()
print(a)
for i in a
print(i)
\ No newline at end of file
......@@ -4,16 +4,13 @@ while True:
unit= input("请输入:")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print("请重新输入一个数字")
else:
total.append(unit)
finally:
print("==================")
return total
else:#except:
#print("请重新输入一个数字")
#else:
#total.append(unit)
#finally:
#print("==================")
#return total
#def sum(money):
#count=0
#for i in money:
......
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