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: ...@@ -4,16 +4,13 @@ while True:
unit= input("请输入:") unit= input("请输入:")
if unit== 'q': if unit== 'q':
break break
else: else:#except:
try: #print("请重新输入一个数字")
unit=int(unit) #else:
except: #total.append(unit)
print("请重新输入一个数字") #finally:
else: #print("==================")
total.append(unit) #return total
finally:
print("==================")
return total
#def sum(money): #def sum(money):
#count=0 #count=0
#for i in money: #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