测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A44500. 绘制图形如下:一个圆有多个半圆组成。要求如下:圆的半径为100,线条为黑色眼睛部分的半圆半径为20,线条为黑色上半部分的圆填充的颜色为”sky blue“下半部分的圆填充的颜色为”yellow“

填空题 中等

题目描述

绘制图形如下:一个圆有多个半圆组成。要求如下:

  1. 圆的半径为100,线条为黑色

  2. 眼睛部分的半圆半径为20,线条为黑色

  3. 上半部分的圆填充的颜色为”sky blue“

  4. 下半部分的圆填充的颜色为”yellow“


参考答案

import turtle import time soviet = 1 ball = 5 turtle.pensize(3) turtle.color("black") turtle.fillcolor("sky blue") turtle.begin_fill() turtle.circle(100, 360) turtle.end_fill() turtle.penup() #onother color turtle.goto(-100, 100) turtle.pendown() turtle.setheading(-90) turtle.fillcolor("yellow") turtle.begin_fill() turtle.pendown() turtle.circle(100, 180) turtle.color("yellow") turtle.end_fill() turtle.goto(-100, 100) turtle.penup() #left eye turtle.goto(-50, 130) turtle.pencolor("black") turtle.pendown() turtle.fillcolor("white") turtle.begin_fill() turtle.setheading(-90) turtle.circle(20, 180) turtle.left(90) turtle.forward(40) turtle.end_fill() turtle.penup() #right eye turtle.goto(50, 130) turtle.pendown() turtle.pencolor("black") turtle.pendown() turtle.fillcolor("white") turtle.begin_fill() turtle.setheading(-90) turtle.circle(20, 180) turtle.left(90) turtle.forward(40) turtle.end_fill() turtle.hideturtle() turtle.done()
上一题 下一题