![logo](/rudransh61/Tortoys/raw/master/logo.jpg)
Its LOGO but BETTER.... A programming language over Turtle Graphics
[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)
- A programming language made for kids to learn about programming and some turtle programming
- Will help them to create beautiful patterns and arts
- They can also learn about python
To install it first you need to clone this repository using git clone
command,
Then make sure you had already installed Python 3.10.9
or above or any other python version which works .
Then install all the requirements by running
$ pip install requirements.txt
# pip must be installed first also with python
Then you can use the following command to run the example project in file example_code.ty
with Tortoys interpreter
$ py ./tortoys.py --f ./example_code.ty
# use / or \ in file according to your OS.
Then you can see the example running...
Tortoys is a simple programming language designed for turtle graphics. It allows users to control a turtle on the screen using a set of commands.
The RIGHT
command rotates the turtle to the right by a specified angle.
RIGHT 90
The LEFT
command rotates the turtle to the left by a specified angle.
LEFT 45
The MOVE
command moves the turtle forward by a specified distance.
MOVE 100
The COLOR
command sets the color of the turtle.
COLOR "blue"
The BGCOLOR
command sets the color of the background.
BGCOLOR "blue"
The MOVETO
command moves the turtle to a specified position.
MOVETO 50 50
The SPEED
command sets the speed of the turtle.
SPEED 2
The TITLE
command sets the title of the turtle screen.
TITLE "My Turtle"
The CLEAR
command clears the turtle screen.
CLEAR
The SETX
command sets the x-coordinate of the turtle.
SETX 50
The SETY
command sets the y-coordinate of the turtle.
SETY 30
The PRINT
command prints a message to the console.
PRINT "Hello, Tortoys!"
The SET
command is used to set variables.
SET A 10
SET B A+5
The CLOSE
command closes the turtle screen.
CLOSE
The DONE
command completes the turtle graphics program.
DONE
Comments in Tortoys start with a #
symbol and are ignored by the interpreter.
# This is a comment
RIGHT 90 # This is also a comment
Variables in Tortoys are used to store values. They are defined using the SET
command.
SET A 10
SET B A+5
Here's a simple example program that draws a square:
# Example: Draw a Square
MOVE 100
RIGHT 90
MOVE 100
RIGHT 90
MOVE 100
RIGHT 90
MOVE 100
This program moves the turtle forward by 100 units, then turns right 90 degrees and repeats the process three more times, creating a square.
Feel free to customize and expand upon these examples to create your own Turtle graphics programs using Tortoys!
Contributions are always welcome!
We want developers who are the future of next generation to transform this small project.
See CONTRIBUTING.md
for ways to get started.