Hi, i'm new to Python and i'm currently following the "How to Think like a Computer Scientist" tutorials. I'm at Chapter 4: Conditionals and doing the last exercise where i need to create six colored houses on a black background.
I've successfully created the house at the bottom left, but when i fill the "house" box with blue color, it blocks out the left window and the door. The right window, miraculously, remain unblocked. (I've left the background color as WHITE for now)
Anybody know why? Do you get the same result with the following code?
from gasp import * begin_graphics(title="Houses At Night", background=color.WHITE) Box((20, 20), 100, 100, filled=True, color=color.BLUE) #the house Box((55, 20), 30, 50, filled=True, color=color.GREEN) #the door Box((40, 80), 20, 20, filled=True, color=color.YELLOW) #the left window Box((80, 80), 20, 20, filled=True, color=color.YELLOW) #the right window Polygon(((20, 120), (70, 160), (70, 120)), filled=True, color=color.RED) #Left Roof Polygon(((70, 160), (120, 120), (70, 120)), filled=True, color=color.RED) #Right Roof update_when('key_pressed') end_graphics()