turtle begin_fill() - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: turtle begin_fill() (/thread-29103.html) |
turtle begin_fill() - thruss - Aug-18-2020 I have coded a picture of Bart Simpson using the goto() methods. One of the final setps is to draw the left eye, followed by the right eye. As Python completes the right eye (as you look at Bart), it draws a line across the nose to the left eye (as you look at Bart). I cannot get rid of it. I think I have closed shapes using my co-ordinates, so the fill should finish as I complete the right eye. It is very frustrating. Be aware, the full code has a yellow head and other features. I am hoping I have successfully shared the code with you using this link: https://trinket.io/python/73b54cc24e The code for just the eyes is: #eyeballs left eye bs.pu() bs.goto(-30,-10) bs.pd() bs.pensize(3) bs.circle(5) bs.pu() #eyeballs - right eye #eyeballs left eye bs.pu() bs.goto(50,-10) bs.pd() bs.pensize(3) bs.circle(5) bs.pu() RE: turtle begin_fill() - deanhystad - Aug-18-2020 The problem is not with the eyes. They work fine. RE: turtle begin_fill() - GOTO10 - Aug-18-2020 Switch lines 116 and 117 so that you do bs.goto(30,-40) before your bs.begin_fill() .
RE: turtle begin_fill() - thruss - Aug-18-2020 Oh my - I have looked and looked at this code! Thank you so much. Very frustrating! RE: turtle begin_fill() - deanhystad - Aug-18-2020 Use input('1') to zoom in on these kinds of errors. I downloaded you code and added an input right after the eyes were drawn and a few others here and there, ran the program and stopped pressing <enter> right after the line appeared. I then knew within a few lines were the problem occurred. And then GOTO beat me to it. RE: turtle begin_fill() - GOTO10 - Aug-19-2020 (Aug-18-2020, 08:43 PM)deanhystad Wrote: Use input('1') to zoom in on these kinds of errors. I downloaded you code and added an input right after the eyes were drawn and a few others here and there, ran the program and stopped pressing <enter> right after the line appeared. I then knew within a few lines were the problem occurred. And then GOTO beat me to it. I did exactly what deanhystad suggests, using an input statement to stop at key points in the code. I just did it slightly earlier than he did. RE: turtle begin_fill() - thruss - Aug-24-2020 (Aug-18-2020, 08:43 PM)deanhystad Wrote: Use input('1') to zoom in on these kinds of errors. I downloaded you code and added an input right after the eyes were drawn and a few others here and there, ran the program and stopped pressing <enter> right after the line appeared. I then knew within a few lines were the problem occurred. And then GOTO beat me to it. |