import turtle turtle.fillcolor('green') turtle.begin_fill() turtle.shape('turtle') turtle.circle(20) turtle.end_fill() turtle.up() turtle.goto(0,-100) turtle.down() turtle.fillcolor('black') turtle.begin_fill() turtle.forward(120) turtle.left(50) turtle.circle(99) turtle.end_fill() turtle.up() turtle.goto(0,-150) turtle.down() turtle.circle(220) turtle.done
trueage = 19 while True: guess=int(input('请猜猜我的年龄')) if guess > trueage: print('我的年龄比这小') elif guess<trueage: print('我的年龄比这大') else: print ('恭喜你猜对啦!') break