Commit 838f414f by BellCodeEditor

save project

parent 1ddab633
Showing with 31 additions and 9 deletions
...@@ -3,13 +3,12 @@ def f(): ...@@ -3,13 +3,12 @@ def f():
while True: while True:
unit= input("请输入:") unit= input("请输入:")
try: try:
if: if unit== 'q':
unit== 'q':
break break
else:
unit=int(unit)
except: except:
print('请重新输入整数')
else:
total.append(unit) total.append(unit)
#else:
# total.append(unit)
print(total)
f() f()
\ No newline at end of file
for i in range (9999):
print("hi")
import turtle
q=turtle.Pen()
for i in range(5):
q.forward(200)
q.right(144)
turtle.done()
\ No newline at end of file
total = [] def e():
while True: total = []
while True:
unit= input("请输入:") unit= input("请输入:")
if unit== 'q': if unit== 'q':
break break
...@@ -10,4 +11,8 @@ while True: ...@@ -10,4 +11,8 @@ while True:
print("请重新输入") print("请重新输入")
else: else:
total.append(unit) total.append(unit)
return total
result=e()
print(result)
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