Answer:

' Draw the Grass
LINE (0, 300)-(150, 280)
LINE (320, 280)-(510, 290)
LINE (540, 295)-(640, 300)

Adding Color to the Final Picture

The illustration shows the complete picture (reduced in size.)

graph paper with house and tree

The picture is now complete. All the tasks have been completed. But the picture could be improved by using color. We would like the house to be drawn in white (as it is), the grass and leaves to be green, and the trunk to be brown. To set the color use:

COLOR colorNumber

where the colorNumber is a number 0 to 15. The color remains set until you change it with another COLOR statment. Here is a table of colorNumbers (repeated from a previous chapter):

Color NumberColor Color NumberColor
0Black 8Gray
1Blue 9Light Blue
2Green 10Light Green
3Cyan 11Light Cyan
4Red 12Light Red
5Magenta 13Light Magenta
6Brown 14Yellow
7White 15Bright White

Here is the complete program:

' House Picture
'

' Start Graphics

SCREEN 12

' Draw the House 

'   Draw the Walls 
LINE (150, 320)-(150, 200)
LINE (320, 320)-(320, 200)

'   Draw the Floor and Ceiling
LINE (150, 320)-(320, 320)
LINE (150, 200)-(320, 200)

'   Draw the Roof 
LINE (150, 200)-(235, 100)
LINE (320, 200)-(235, 100)

' Draw the Tree 

'   Draw the Trunk 
LINE (510, 400)-(510, 240)
LINE (540, 400)-(540, 240)

'   Draw the Leaves 
CIRCLE (525, 160), 80

' Draw the Grass
LINE (0, 300)-(150, 280)
LINE (320, 280)-(510, 290)
LINE (540, 295)-(640, 300)
END

QUESTION 21:

Add COLOR statements to the program so that the objects are drawn in the desired colors.