Questions tagged [turtle-graphics]

A method for drawing computer graphics using a cursor, known as a turtle. Turtle-graphics supports game development, visualizations, animation, etc.

A method for drawing graphics, which uses a cursor (known as a turtle) for specifying the position, the direction and the attributes (color, line width, etc.) of the lines being drawn. It was popularized by the Logo programming language. Similar functionality can currently be found in Python's turtle module, which is part of its standard library.

The turtle runs commands sent to it sequentially, including moving forwards or backwards, turning/rotating, and raising or lowering "the pen" determining if the turtle is currently drawing a line while moving. This output pathway of the turtle can additionally be post-processed into 3-dimensional models. Depending upon the implementation, the turtle may traverse 2D, 3D, or N-dimensional coordinate spaces.

3188 questions
0
votes
2 answers

Is it possible to use turtle objects in a tkinter screen?

I wanted to make a sort of tennis game and I decided to use Tkinter, although I hadn't figured out how to add shapes or images to the screen. is there a way to use the turtle module to add objects using "object = "t.Turtle()" onto the tkinter…
0
votes
1 answer

Increasing Turtle Speed for a game in Python 3.9

I've been makeing a game using turtle and i've set speed to 0 using turtle.speed(0), although this is not fast enough, i've done some research but i cant find any commands for python 3.9 that will deactivate animations or increasing turtle speed…
0
votes
1 answer

Variable is not updating with the incrementation of another related variable?

I want to preface this by saying I'm very much a beginner. From my understanding, the side variable should increment by one indefinitely under the while loop and therefore the angle variable will reflect the new equation. Using a code visualizer, I…
andrew
  • 81
  • 1
  • 8
0
votes
1 answer

AttributeError: partially initialized module 'turtle' has no attribute 'Pen' (most likely due to a circular import)

Can anyone tell me why this code dosen't work? import turtle t = turtle.Pen for x in range(100): t.forward(x) t.left(90) turtle.done()
0
votes
1 answer

How can I make my (python)balls stay in the box?

Besides the sussy title (sorry I had no better way to put it) I'm doing a project where I have to keep bouncy balls bouncing in a square. This is my code (pls use the same turtle names) import turtle import random turt = turtle.Turtle() tart =…
24bit
  • 15
  • 3
0
votes
1 answer

How can I get my turtle to stop moving, and end the event

So I'm making a "game" where the turtle has to stay in the square, and if it moves out the game ends. I used the break command in a while loop, and in the instructional video provided with the assessment, it worked, but I can't get it too.If you're…
24bit
  • 15
  • 3
0
votes
0 answers

How to draw Star polygons using turtle graphs in python?

#Thank you so much for commenting. I have revised my post. It's my first time using stack overflow and I did not ask the question properly.(Plus English is my second language, so my phrasing could be confusing...Sorry about that!) I am currently…
Axiu666
  • 1
  • 1
0
votes
1 answer

Python -- How do I use onkey to exit a while loop?

I'm trying to build a game similar to snake with the turtle library. I was able to make the turtle continually move forward with a while True loop, and also make turns without breaking the while loop. Now I'm trying to figure out a way to exit the…
Augustus
  • 23
  • 1
  • 6
0
votes
2 answers

How abs() works for 2D vector

I can't understand how abs() function works with pos() method from Turle graphics: from turtle import * while True: forward(200) left(170) print(str(abs(pos()))+"\t\t"+str(pos())) if abs(pos()) < 1: break The abs() function…
raqu
  • 3
  • 2
0
votes
1 answer

I have this error : raise turtle.Terminator

I hope it run and do not stop. I'm making Conway's Game of Life, if my code look stupid, please help me, I'm only 11. I use the details from wiki, if it's wrong , please tell me. Thankyou! import turtle,random START_POSITION=[] def ReStart(): …
0
votes
0 answers

Turtle Library Screen Not Working Properly in Mac but Working in other systems

I wanted to make a pong game in Python by using the Turtle library, but the output screen is not correct. the output screen is like this. But it should be like this here is my code:- import turtle wn = turtle.Screen() wn.title("Pong by…
0
votes
0 answers

How to put spaces between the paragraphs in turtle window and is there a way I can shorten down the code to writing all the text in one line

import time import turtle turtle.speed(speed= None) ElizabethBishop = turtle.Turtle() ElizabethBishop.shape('turtle') ElizabethBishop.penup() def line(words, horiz_pos = -50): x,y = ElizabethBishop.pos() ElizabethBishop.goto(max(horiz_pos, -190),…
coder
  • 1
0
votes
1 answer

Is the turtle module in python just a learning tool

I'm a beginner/intermediate programmer and i've recently been introduced to the turtle module as part of my curriculum in learning to be a programmer. I've been making some pretty cool stuff with it, but i was just wondering how far can i really go…
CodingOwl
  • 17
  • 3
0
votes
0 answers

How do I check if my sudoku is correct in python turtle?

I'm trying to write a sudoku program. It works, it draws the board and you can fill in the missing numbers yourself by clicking on the screen, selecting a box (A2 or C7 or G4 etc.) and then entering a number from 1 to 9. I also added a reset button…
0
votes
1 answer

Does Python turtle's ontimer method use multithreading or multiprocessing or none?

What if I set two or more timers to call a function after the same amount of time. How can turtle's ontimer method handle this situation? Does it use multithreading or multiprocessing or none of them?
Gold_Leaf
  • 53
  • 7