同心圆 猜数字游戏

import turtle
turtle.circle(100)

turtle.up()
turtle.goto(0,50)
turtle.down()

turtle.circle(50)


turtle.up()
turtle.goto(0,-50)
turtle.down()

turtle.circle(150)

turtle.up()
turtle.goto(0,-100)
turtle.down()

turtle.circle(200)

turtle.down
myNum = 9
print('猜数字游戏\n')
 
while True:
    guess = int(input('请输一个数字:'))
    if guess > myNum:
        print('猜大了')
    elif guess < myNum:
         print('猜小了')
    else:
        print('恭喜你,猜对了!')
        break
 
 

 

猜你喜欢

转载自www.cnblogs.com/shijiediyiwen/p/9003125.html