💡 For the best experience, set your browser zoom level to 75%

    ‎75%‎ للحصول على أفضل تجربة، اضبط مستوى تكبير المتصفح على 💡

Skip to main content
Completion requirements

Lesson 17 – Assignment

 

Title: Drawing a Simple Scene using Python Graphics

Objective:
Use the graphics.py module to draw a simple graphical scene that includes the following shapes and text:

  • A window titled "My Drawing" with size 400x400.
  • A sun (circle)
  • A ground line (line)
  • A tree made with an oval (leaves) and a rectangle (trunk)
  • A welcome message using Text()

Instructions:

1.    Import everything from the graphics module: from graphics import *

2.    Create a GraphWin object with title and size.

3.    Use Circle, Line, Oval, and Text to design the scene.

4.    Use the draw(window) method to display each object.

5.    Add color to at least two shapes using setFill().