程序執行流程/布爾類型與布爾:運算猜數字遊戲;
阿新 • • 發佈:2018-05-02
imp color 布爾 red spa png code alt done
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()
程序執行流程/布爾類型與布爾:運算猜數字遊戲;