Turtle Colision

I am making a game using the turtle module, and want to detect colision betwen the original and the clone.I have tried saving the position of the clone, and then checking if the original has the same position, but the turtle only detects the clone if it has the exacly same position. Is there another… Read More Turtle Colision

How can I use the tkinter module to make a controller for turtle?

I want to make a controller for the turtle module using the tkinter module. I wrote a code myself but it didn’t work. It also contains four forward, backward, left and right. Can someone answer me and explain with a solution? from tkinter import * import turtle def turtle(): if Button1==1: turtle.forward(100) done() if Button2==1:… Read More How can I use the tkinter module to make a controller for turtle?

DrawRectangleBrick() missing 1 required positional argument: 'y'

I am trying to create a brick wall using turtle for my python coding class and I cannot figure out why I am receiving the error "DrawRectangleBrick() missing 1 required positional argument: ‘y’" here is where the issue is: def DrawRectangleBrick(x,y): global SQUARE_SIZE for i in range(4): if i% 2 == 0: tr.forward(SQUARE_SIZE * 2)… Read More DrawRectangleBrick() missing 1 required positional argument: 'y'

What am I doing wrong? Why do the actions not work while they're supposed to?

I’ve been using python for around 2 months, I’ve been mostly working with tkinter but today I’ve decided to try out turtle. I’m currently working on a clicker game where when you click a mouse(an image), you receive 1 click, what I’m having problem is that when for example, when you get 10 clicks, something… Read More What am I doing wrong? Why do the actions not work while they're supposed to?

Python Turtle Error In Visual Studio Code

So i made a python turtle thing a while ago and it worked just fine. However, when i try to run it now it doesnt work. Here is the code: import turtle turtle.forward(100) turtle.right(144) turtle.forward(100) turtle.right(144) turtle.forward(100) turtle.right(144) turtle.forward(100) turtle.right(144) turtle.forward(100) turtle.exitonclick() It gives a error saying: Exception has occurred: AttributeError module ‘turtle’ has no… Read More Python Turtle Error In Visual Studio Code

How can i get the output to print 10 circles instead of 9 in python turtle module

I’m trying to figure out why my painting is not having the desired final outcome. As you can see, the first row is printing 10 circles but then the following rows are only printing 9. Have a look at my code, and the attached image. from turtle import Turtle, Screen import turtle import random colours… Read More How can i get the output to print 10 circles instead of 9 in python turtle module

Getting error while try to color my turtle

from turtle import Turtle my_turtle = Turtle() my_turtle.color(40.0, 80.0, 120.0) my_turtle.forward(50) The code works well when I try to work with str such as .color("green") or .color("#285078"), but while I work with the 3 int I get this error: Traceback (most recent call last): File "E:\Python Projects\Practice\Day 18\main.py", line 4, in <module> my_turtle.color(40.0, 80.0, 120.0)… Read More Getting error while try to color my turtle