Skip to content
Advertisement

Tag: turtle-graphics

How can I set boundaries on the screen?

I’m trying to make it so that If the arrow reaches the screen boundary it will go up and turn around continuing the code so that I can create a piece of art. I’ve been looking for a post to answer my problem but I can’t find anything that’s specific to this problem. Thanks! Answer I think what’s missing is

Creating Bricks with Turtle Python

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

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

Why is the turtle not turning?

My turtle won’t move with my key press. When you remove the self.forward part, it turns just fine, but when it moves it doesn’t work. How can I make it so that turtle turns while it is moving. Also, what was it that didn’t work in my code before. Also, the image labeled backround isn’t loading. How do I fix

Turtle Graphics: Onscreenclick doesn’t work

학번, 이름, 전공 it says that Exception in Tkinter callback Traceback (most recent call last): File “C:UserssuyeoAppDataLocalProgramsPythonPython39libtkinter_init_.py”, line 1892, in call return self.func(*args) File “C:UserssuyeoAppDataLocalProgramsPythonPython39libturtle.py”, line 674, in eventfun fun(x, y) TypeError: ‘str’ object is not callable Answer onscreenclick and onkeypress setup callbacks – functions that are called when those events happen. You only need to call these functions once

Turtle onkeypress function not taking input

I was watching a video where the Turtle module was being used for making a Pong game. But the onkeypress function isn’t taking inputs, even after clicking on the window of Pong. OS: Ubuntu 20.04 LTS I pressed the up arrow and even tried other keys, but it didn’t work. Answer Sorry, I just realized my mistake. Here, “sety” was

Advertisement