Commit 493ff459 by BellCodeEditor

auto save

parent dc70412a
Showing with 44 additions and 0 deletions
def new_input():
total = []
while True:
unit= input('请输入(q退出):')
if unit== 'q':
break
else:
try:
unit = int(unit)
except:
print("请输入整型")
total.append(unit)
print(total)
new_input()
\ No newline at end of file
import turtle as t
for i in range(4):
t.forward(200)
t.right(90)
t.fillcolor("blue")
t.forward(100)
t.penup()
t.right(90)
t.forward(100)
t.right(90)
t.forward(50)
t.left(90)
t.begin_fill()
t.pendown()
t.circle(50,360)
t.end_fill()
t.done()
with open(r"c:\Users\PC\Desktop\num.txt",'r',encoding="utf-8") as o:
a=o.readlines()
for i in a:
d=i.split()
c=d[1:]
e=d[0]
f=0
for i in c:
f+=int(i)
print(f)
\ 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