Commit 9d39700d by BellCodeEditor

save project

parent 367d5eb7
Showing with 34 additions and 13 deletions
a=0
def qwer(): def qwer():
total = [] total = []
while True: while True:
...@@ -5,14 +6,11 @@ def qwer(): ...@@ -5,14 +6,11 @@ def qwer():
if unit== 'q': if unit== 'q':
break break
else: else:
try: total.append(unit)
unit=int(unit)
except:
print("请重新输入")
else:
total.append(unit)
print("-"*30)
return total return total
result=qwer() result=qwer()
def
for i in range()
a=a+i
print(result) print(result)
\ No newline at end of file
a=0
def qwer():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
total.append(unit)
return total
result=qwer()
def
for i in range()
a=a+i
print(result)
\ No newline at end of file
import func
func.qwer()
func.qwert
\ No newline at end of file
a=0
def qwer(): def qwer():
total = [] total = []
while True: while True:
...@@ -8,8 +7,9 @@ def qwer(): ...@@ -8,8 +7,9 @@ def qwer():
else: else:
total.append(unit) total.append(unit)
return total return total
result=qwer[] def qwert()
result=qwer()
for i in range() for i in range()
a=a+i
print(result) print(result)
\ No newline at end of file \ 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