i’m very new to programming and in here i’m supposed to create a pyramid shape of bricks where the edge of the pyramid is filled with one color and the inside of it is filled with random colors, but i can’t seem to figure it out how to move the bricks to create a new row, column and the random
Tag: python-turtle
Turtle graphic not running?
i’m more of a backend web developer and this is for a friend of mine but i have this issue with turtle where her code wont run and i keep getting syntax errors saying certain things aren’t defined. Heres the code Answer If you use import turtle then you have to use turtle.penup(), turtle.setposition(), etc. Original code would work if
Turtle only completes one iteration of a loop and stops at done()
I am trying Python turtle and I am facing this error: Here is my code: Answer The problem is calling done() in the loop. Let’s check the docs for this function: turtle.done() Starts event loop – calling Tkinter’s mainloop function. Must be the last statement in a turtle graphics program. Must not be used if a script is run from
Is there a way to get and save an angle of a turtle for later?
I’m making a program where the user can click on the screen 3 times and it makes a triangle. It will then find the middle points of those 3 lines. Next, I want it to draw 3 lines perpendicular to each of the lines that make up the triangle (through the middle points). I’m stuck at drawing the perpendicular lines.
Why does my turtle not draw my race lanes?
So I’m making a turtle race, but I wanted to make my code shorter by using def. I haven’t used it before but I looked up examples and I have no idea what my code is missing because it doesn’t work. I basically want to draw a lot of “|” but with 15 rows and 5 columns with 20 ‘spaces’
Draw Co-ordinates using Turtle
I’m trying to draw a set of co-ordinates using Python Turtle, however ,I’m stuck and have no clue how to move on. I know that I have to set up a loop function but I’m not sure how to write it out, still new to programming. Answer Add this to the loop in print_map:
Draw faster circles with Python turtle
I have an exercise wherein I have to draw a lot of circles with Python turtle. I have set speed(0) and I am using: to draw circles. It takes so long. Is there any faster way? Answer You could draw fewer segments, so rather than 360 you go for 120: That will make your circle less smooth, but three times
How to create a subclass in python that is inherited from turtle Module
So, i’m trying to learn python and every time i post a question here it feels like giving in… I’m trying to make my own class of turtle.Turtle. Gives the Traceback: AttributeError: ‘TurtleGTX’ object has no attribute ‘_position’. Which I then learn is a “private vairable” which according to the offical python tutorial i can mangle/override in my subclass TurtleGTX.