程序执行流程/布尔类型与布尔:运算猜数字游戏;库的使用:turtle

input('start')
myNumber = 7

while True:
    guess = int(input())
    if guess > myNumber:
        print('>')
    elif guess < myNumber:
        print ('<')
    else:
        print('')
        break

import turtle
turtle.fillcolor('red')
turtle.begin_fill()
turtle.circle(100)
turtle.end_fill()

turtle.up()
turtle.goto(0,-100)
turtle.down()
turtle.fillcolor('blue')
turtle.begin_fill()
turtle.circle(300)
turtle.end_fill()

turtle.down()
turtle.goto(0,-50)
turtle.down()
turtle.fillcolor('red')
turtle.begin_fill()
turtle.circle(150)
turtle.end_fill()

turtle.circle(100)
turtle.fillcolor('yellow')
turtle.begin_fill()
turtle.circle(50)
turtle.end_fill()

turtle.done()

posted @ 2018-05-02 21:16  BiuBiu怪  阅读(82)  评论(0编辑  收藏  举报