About 52 results
Open links in new tab
  1. python - What is the difference between `import turtle` and `from ...

    The difference is, well, obvious -- one of them keeps your namespaces separate, the other doesn't. In general, use the import turtle approach -- that way you always know which module something refers …

  2. How to draw a circle using turtle in python? - Stack Overflow

    Nov 2, 2020 · I wanted ask how can I draw a circle using turtle module in python just using turtle.forward and turtle.left? I use the code below: for i in range(30): turtle.forward(i) turtle.left(i)

  3. Why can't I import my turtle module in Python? - Stack Overflow

    Jun 4, 2021 · 0 When importing a module in python, you can import using import turtle and you need to specify the module before each function like

  4. python - What does turtle.Screen () actually do? - Stack Overflow

    Jul 30, 2022 · Turtle can be used standalone (self contained program) via Turtle and Screen but it also can be used embedded in a tkinter program using RawTurtle and TurtleScreen. When embedded, …

  5. import - Creating a screen on python (turtle) - Stack Overflow

    Oct 29, 2021 · For an assignment, I have to create a turtle program on python which uses recursion to draw a shape. However, I am unable to even create the necessary screen to draw any shapes on. I …

  6. python - partially initialized module 'turtle' has no attribute ...

    May 27, 2021 · Oh yeah I savved my file by turtle.py -- comment by OP Don't do that! Your code will not import the Python turtle.py library but rather assume your code is that library. And all the functions …

  7. python - Turtle Graphic Window not working from VS Code - Stack …

    Nov 23, 2019 · You can create a canvas into turtle like a blank space to draw on. Use this code just to import the module an hold on the graphic window open -Pen It will work with Visual Studio Code, …

  8. VS Code Python turtle - Stack Overflow

    I need to use turtle library in Python in VS code. When I try to run my code: import turtle turtle.forward (100) turtle.left (90) turtle.forward (100) turtle.left (90) turtle.forward (100) turtle.left (90)

  9. python - How do I fix NameError: name 'turtle' is not defined. Did you ...

    Feb 16, 2023 · Avoid from turtle import *. It pollutes the namespace with over 120 functions and generally leads to confusion between turtle's instance and functional APIs:

  10. Can't import turtle module in Python 2.x and Python 3.x

    I try to import turtle module. And python interpreter search turtle module and first seek turtle.py in my current folder instead of turtle.py from python library directory.