Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
3 answers
189 views

from turtle import * import random import time #making the main 8-ball def main_8_ball(): #used to be the main drawing, not needed write("8", font=('Arial',24,'normal')) ...
Blok's user avatar
  • 1
0 votes
1 answer
84 views

I'm trying to draw a grid in the turtle, but doing so requires knowing the positions of the corners of the screen. turtle.goto(0, 0) does not move the turtle to the middle of the screen; instead, it ...
James Logie's user avatar
-1 votes
4 answers
96 views

I'm trying to move pieces of a high school comp sci project to trinket and I keep getting the following error: TypeError: <native JS>() got an unexpected keyword argument 'shape' on line __ in ...
Emma Garon's user avatar
0 votes
1 answer
128 views

When trying to write different functions with the turtle module in Thonny, my screen froze. I've been trying to find out why, but haven't had any luck with it. It's a simple code, so I'm unsure what ...
Santiago Sánchez's user avatar
-5 votes
1 answer
110 views

I’m building a turtle race. I want the blue turtle to move to x=280 by repeating this pattern: draw a downward semicircle (“bowl”) then a short straight stride to the right repeat until it reaches ...
BLaHblahBLAH's user avatar
0 votes
1 answer
175 views

I want to know if Python Turtle has a fill option other than begin_fill() and end_fill(), because my project is to draw Spongebob. Spongebob's body has fractions of ovals on its borders, so I ...
ونداد شاهدی's user avatar
4 votes
1 answer
66 views

Here is a HUGELY simplified version of my code: from turtle import Turtle, Screen import time speed_x = 20 speed_y = 29 def move_right(): print('exectuted') def game_loop(): ball.goto(ball....
Aadvik's user avatar
  • 1,532
1 vote
1 answer
22 views

Here is my code: from turtle import Turtle, Screen import time import random def check_wall_collision(): if ball.xcor() > (window.window_width() / 2) - 20 or ball.xcor() < -(window....
Aadvik's user avatar
  • 1,532
0 votes
1 answer
81 views

I am coding minesweeper in python turtle. I have made it generate 10x10 button layout using this script: position_x = -400 position_y = -200 number_colum = 0 rows_buttons = [] for i in range(10): ...
Charles Wiewiora's user avatar
-1 votes
2 answers
72 views

I'm working on a silly page for my friends, however when the code askes for user input I am incapable of entering any data. How can I possibly fix this? # import the turtle module import turtle as ...
Keely Meyer's user avatar
0 votes
1 answer
107 views

I'm trying to create the Breakout game with python's turtle module, but for something I haven't yet identified I can't center the image correctly! from turtle import Turtle class Game(): def ...
João Pedro F's user avatar
0 votes
1 answer
68 views

I have a list with several turtle instances. I want to create a copy of one object and let this one move forward. This works fine. But when I disable screen udpates and do it manually in my code it ...
Denny Crane's user avatar
-1 votes
1 answer
67 views

Im a coding beginner who just got into python turtle. I have recently been working on a project where you control 2 characters. They are trying to shoot each other over a river. But i ran into an ...
Joshua's user avatar
  • 1
0 votes
1 answer
52 views

I'm making a game similar to Subway Surfers where there are 3 lanes and obstacles come at the player. The obstacles move faster and score goes up every 16th time the game loop is repeated. That all ...
user29173808's user avatar
2 votes
2 answers
168 views

I was creating a tkinter/turtle program similar to MS paint and I have the barebones Turtle finished but I am unsure of how to add the turtle into tkinter as a sort of window (Having the tkinter as ...
Dante Crugnale's user avatar
-3 votes
1 answer
165 views

Is there any practical use for the turtle module in Python? It is good for practicing graphics, but is that all the module is good for? It's objectively slow, yet new versions of Python continue to ...
Steph's user avatar
  • 66
4 votes
2 answers
103 views

I'm a beginner in Python and trying to code a game such as Space Invaders. I created everything but when I move my character and fire, the bullet will remain shooting from the character's original ...
Needle_Kane's user avatar
0 votes
0 answers
106 views

I'm trying to use my own Tk window for my turtle interface so that I can add Tk widgets to my turtle program. It's a very simple program where you can draw with the turtle pen. However, I want to have ...
lvjsmn's user avatar
  • 100
-1 votes
1 answer
64 views

I'm making a crossy game from 100 Days of code, except I'm making it from scratch since I don't have the recommended IDE(Pycharm) I used randrange to get an integer instead of randint because I'm ...
ThatOneKid's user avatar
2 votes
1 answer
114 views

Below is a Python code for my "Snake Project" (with Turtle and Tkinter). The purpose of this program is to create a chain of turtles, called followers, that follow each other, with the first ...
Number_Pi's user avatar
0 votes
0 answers
25 views

def square(x): for i in range(4): allmight.pendown() allmight.forward(x) allmight.right(90) def nextshape(jump): allmight.penup() allmight.forward(jump) allmight.pendown() def ...
cool hacker guy ig's user avatar
0 votes
1 answer
101 views

When I try run this code, everything seems to work but when getting the final score, I don't get a score as it only appears blank. #!/usr/bin/env python3 import json #this is to load the files of from ...
Anonymous User's user avatar
0 votes
2 answers
91 views

import turtle drawTurtle = turtle.Turtle() drawTurtle.shape("turtle") drawTurtle.speed(500) drawTurtle.hideturtle() drawTurtle.penup() drawTurtle.goto(180,65) drawTurtle.pendown() ...
maayanananaan's user avatar
0 votes
1 answer
66 views

I am trying to make a game with 2 turtles that move in Python Turtle. I have used the onkey() command to make the turtles move. I want to make them move at the same time because the game is kind of ...
Phyzikzbro88's user avatar
-3 votes
1 answer
71 views

So I have a movement script for my turtle (called mc) from turtle import * wn = Screen() MC=Turtle() def w(): mc.shape(FFM1) mc.forward(40) mc.shape(FFM2) mc.forward(40) mc.shape(...
Isaac Chick's user avatar
0 votes
0 answers
68 views

So I have a movement script for my turtle (called mc) from turtle import * def w(): mc.shape(FFM1) mc.forward(40) mc.shape(FFM2) mc.forward(40) mc.shape(FFS) def s(): mc....
Isaac Chick's user avatar
1 vote
2 answers
356 views

Here is my code: import turtle t = turtle.Turtle() t.width(5) t.right(112.5) t.forward(100) t.circle(50, 225) t.forward(100) t.hideturtle() It almost makes the correct shape, but the two points at ...
Sam1009's user avatar
  • 37
0 votes
1 answer
95 views

I have been trying to create and export an image with python turtle graphics, and I am using turtle.getscreen().getcanvas().postscript(name="foo.esp") to export it (found here). When I call ...
Laszlo Pav's user avatar
-1 votes
1 answer
63 views

I am making a Python Turtle project that will let me input 3 colour values which then get used as a colour for a circle, then it should print the rgb values of the colour and the hex values in the ...
Froump's user avatar
  • 1
1 vote
1 answer
30 views

How can I get the current angle of the turtle? I need to check if the turtle is facing east or west (positive or negative) to make a DVD Video Screensaver. I've looked through every turtle function ...
aqwek_'s user avatar
  • 13
0 votes
4 answers
104 views

Here is a pattern that I made: import turtle t = turtle.Turtle() for i in range(4): t.forward(150) t.right(90) t.forward(50) t.right(90) t.forward(100) t.backward(50) t.left(90) t.forward(...
Sam1009's user avatar
  • 37
0 votes
1 answer
106 views

I found helpful posts on this site on how to get a Python turtle to write rotated text by using the create_text() method in the tkinter Canvas object. The turtle is writing exactly what I want but it'...
simonc8's user avatar
  • 51
4 votes
3 answers
122 views

I'm doing an assignment on using turtles to make sunflower petals using pentagons. Everything is as it should be, except for the color of the petals. It strictly says that the colors of said pentagons ...
Bongani Langa's user avatar
1 vote
1 answer
257 views

I've been trying the Turtle crossing game. It's basically getting the Turtle start out at the bottom of the screen and have it move across the screen while several randomly generated cars travel from ...
KrH's user avatar
  • 11
2 votes
1 answer
145 views

I am working on the famous snake game in Python and I've stumbled upon a glitch where the snake starts doing when it eats food. The snake should keep constant speed throughout the game and the ...
Baha Hytham's user avatar
1 vote
3 answers
174 views

I have encountered an issue with the turtle graphics code. Despite trying various methods to hide the turtle, such as using bob.hideturtle() at different points in the code, the arrow remains visible. ...
Smilingpotato404's user avatar
0 votes
0 answers
104 views

I have a student on MacOS (Sonoma 14.6.1) getting an error when they try to create a window in a function: def nothing_window(): window = tkinter.Tk() window.mainloop() When they call that ...
Kyle's user avatar
  • 594
1 vote
1 answer
80 views

Here's my code: from turtle import Turtle, Screen window = Screen() window.setup(width = 800, height = 800) window.bgcolor("Black") position = [(-40,0), (-20,0), (0,0)] turtles = [] window....
مصطفى أحمد MOSTAFA AHMED's user avatar
0 votes
1 answer
85 views

I attempted to recreate a background using the code below, but I am unsure how I can recreate the background image below. I was able to get the correct colours and the yellow sun in the middle, ...
Louis Lam's user avatar
0 votes
1 answer
99 views

The task is to draw an equilateral triangle that will be positioned in the first quadrant, so that it is symmetrical with respect to the bisector of the first and third quadrants. Image of triangle ...
Bartol's user avatar
  • 11
0 votes
1 answer
38 views

I'm doing my UNI's basic programming course and haven't used turtle since high school, and I was wondering why exactly this shape is filling incorrectly. Pictures are attached as to how it fill, and ...
maeve's user avatar
  • 1
2 votes
3 answers
2k views

I am trying to make a hirst painting (dot pattern) using the turtle in python. I managed to achieve it. Hirst_painting_dot_pattern.But my for loop isn't working the way I have expected. It's omitting ...
Savi's user avatar
  • 21
-1 votes
1 answer
113 views

I'm working on a Python Snake game using the turtle module. I have four files: main.py, food.py, scoreboard.py, and snake.py. Here is my main.py code: from turtle import Screen from snake import Snake ...
Ayush Dey's user avatar
0 votes
2 answers
126 views

How do I move this, and make a square a proper position. import turtle def draw_square(): window = turtle.Screen() window.bgcolor("red") brad = turtle.Turtle() brad.shape(&...
Julius San Jose's user avatar
0 votes
1 answer
100 views

I am creating the snake game with a twist. I want questions to appear on top and their answers to appear randomly on the screen. I am using turtle and creating classes while retrieving the question ...
Aana's user avatar
  • 11
1 vote
0 answers
67 views

I wrote a collision function to make the ball bounce back after it hits the wall. It's called wall_collision in ball.py. Issue The collision function called wall_collision does not work as expected: ...
Hamzacreator's user avatar
1 vote
1 answer
81 views

I'm working with Turtle, recreating the pong game as part of an intro course. I have 2 turtle objects, called paddles, stored in a dict with the relevant keys to move them, see below. I'm trying using ...
ntnk00's user avatar
  • 13
0 votes
3 answers
74 views

I want to use the commands as parameters in a function. Is there any way ? import turtle as t pen=t.Turtle def orders(name,var) : pen.name(var) orders(forward,50) orders(right,90) t.done() I ...
Raihan Ahamad's user avatar
0 votes
0 answers
30 views

I am creating the Pong game using the Turtle module in Python. So far, I have one file for the paddles (the bars that players control to hit the ball) called paddles.py and a second file for the main ...
Aya Noaman's user avatar
2 votes
1 answer
74 views

Using the turtle module to make a pong game. For this part, when I press the up/down keys the board doesn't respond to the onkey listen function. I created the board/bat (or bat specs function from ...
chris's user avatar
  • 23

1
2 3 4 5
33