Commit 838f414f by BellCodeEditor

save project

parent 1ddab633
Showing with 42 additions and 18 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)
f()
#else: \ No newline at end of file
# total.append(unit)
print(total)
f()
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 = []
unit= input("请输入:") while True:
if unit== 'q': unit= input("请输入:")
break if unit== 'q':
else: break
try:
unit=int(unit)
except:
print("请重新输入")
else: else:
total.append(unit) try:
unit=int(unit)
except:
print("请重新输入")
else:
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