Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.


+5 votes

I put in the code for the eyes and I think it's right like the code runs but nothing shows up on my face. :(

asked in CSC201 Spring 2021 by (1 point)

4 Answers

+4 votes
Best answer

Hi! there are two different reasons that I can come up with to this problem:

  1. You should check the order of the code in case the eyes were covered (or behind) the face. The order is that what was drawn first in the code would be displayed in the back and what is drawn after would be displayed in the front.
  2. You haven't used the function to draw the eyes to the window. This is why the program still runs even though the eyes disappear.

Hope this helps!!

answered by (1 point)
selected by

Thnaks TK!


It looks like TK's option #2 is your issue. After you create the eyes, you need to include the function to draw each eye. Something like:

+2 votes

Can you show a snipit of the code that you did for the eyes that you think isn't working?

answered by (1 point)

I don't know how to put a picture in but this is my code

def main():

window = GraphWin('Smiley',500,500)
Leye=Circle(Point(215,240), 10)
Reye=Circle(Point(285,240), 10)


+2 votes

Have you remembered to set the color?

answered by (1 point)
+1 vote

The order of the drawing is how you order your code so it might be behind your mouth or face
If not, you should check if there is anything wrong with the typing

answered by (1 point)