import turtle import time turtle.fillcolor('red') turtle.begin_fill() turtle.forward(100) turtle.right(144) time.sleep(1) turtle.forward(100) turtle.right(144) time.sleep(1) turtle.forward(100) turtle.right(144) turtle.forward(100) time.sleep(1) turtle.right(144) turtle.forward(100) turtle.end_fill() time.sleep(3) turtle.done()
myNumber = 9
while True:
guess = int(input('请输入一个数量:'))
if guess > myNumber:
print('输入的数量过大')
elif guess < myNumber:
print('输入的数量过小')
else:
print('输入的数量正确')
break
>>> import turtle >>> turtle.circle(50) >>> turtle.circle(100,steps=6) >>> turtle.color('blue') >>> turtle.circle(150) >>>
>>> import turtle >>> turtle.circle(50) >>> turtle.up() >>> turtle.goto(0,-50) >>> turtle.down() >>> turtle.circle(100)
>>> import turtle >>> turtle.circle(60) >>> turtle.circle(80) >>> turtle.circle(100)