In this we will be doing the basic movements of the turtle. So first we will do all the imports and starting up stuff like Screen, Turtle, shape, and other stuff. So start by putting this into your code:
turtle is a package, and on repl.it, you need to get the proper repl for the package. If you were running on Linux or something, once you have installed python (sudo apt install python3 I think), you would just import turtle, and it would open a new window.
Making 2D Minecraft With Python: Part One
In this we will be doing the basic movements of the turtle. So first we will do all the imports and starting up stuff like Screen, Turtle, shape, and other stuff. So start by putting this into your code:
Now we’re going to check if the Up button is pushed (using the onkey function so we don’t have to push enter!). So type this in to your code:
Now we can do backwards left and right!
At the end of all the code it should look like a square on a white screen that you can move around with the arrow keys
turtle is a package, and on repl.it, you need to get the proper repl for the package. If you were running on Linux or something, once you have installed python (sudo apt install python3 I think), you would just
import turtle
, and it would open a new window.