I'm using the command from turtle import and it's not coming out also with the command forward (50) , What am i missing?
This is the code you want:
from turtle import *
a = Turtle()
Let's break down this code:
- Well obviously, you need to import the turtle. When you use * that means your importing everything.
- Turtle() is the actual arrow thing that moves on the screen it is not the screen, it comes up automatically. If you want to add special attributes to the screen you can do s = Screen() and then the attributes. For now, this is just the turtle that will move.
- This line moves it 50 px straight. We indicate the turtle we are moving which is a then putting the command.
- Then we end the line, you don't need this line but when you x out of the turtle screen an error will appear in the shell. Also, it is kind of a standard for python developers.