Commit c1cd2fcb by BellCodeEditor

auto save

parent 84402833
Showing with 44 additions and 17 deletions
a=input("输入五个数字")
b=a.split(",")
c=0
for i in b:
c+=int(i)
d=c/5
print(str(c)+" "+str(float(d)))
import turtle as t
t.pencolor("black")
t.penup()
t.goto(-100,100)
t.pendown()
for i in range(4):
t.forward(200)
t.right(90)
t.color("blue","blue")
t.penup()
t.goto(0,-50)
t.pendown()
t.begin_fill()
t.circle(50,180)
t.end_fill()
t.done()
import turtle as t
t.pencolor("orange")
t.penup()
t.goto(0,-100)
t.pendown()
t.circle(100,360)
t.penup()
t.goto(-100,0)
t.pendown()
t.goto(100,0)
t.penup()
t.goto(0,100)
t.pendown()
t.goto(0,-100)
t.done()
def new_input():
total = []
while True:
unit = input("请输入:")
if unit == 'q':
break
else:
try:
unit == int(unit)
except:
print('请输入整数')
else:
total.append(unit)
print("-"*30)
print(total)
print(new_input())
\ 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