Skip to content

Tortoys : A programming language made for kids to learn about programming and some turtle programming

License

Notifications You must be signed in to change notification settings

rudransh61/Tortoys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tortoys

logo

Tortoys

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

Author

How to install it

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...


Documentation

Introduction

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.

Commands

RIGHT

The RIGHT command rotates the turtle to the right by a specified angle.

RIGHT 90

LEFT

The LEFT command rotates the turtle to the left by a specified angle.

LEFT 45

MOVE

The MOVE command moves the turtle forward by a specified distance.

MOVE 100

COLOR

The COLOR command sets the color of the turtle.

COLOR "blue"

BGCOLOR

The BGCOLOR command sets the color of the background.

BGCOLOR "blue"

MOVETO

The MOVETO command moves the turtle to a specified position.

MOVETO 50 50

SPEED

The SPEED command sets the speed of the turtle.

SPEED 2

TITLE

The TITLE command sets the title of the turtle screen.

TITLE "My Turtle"

CLEAR

The CLEAR command clears the turtle screen.

CLEAR

SETX

The SETX command sets the x-coordinate of the turtle.

SETX 50

SETY

The SETY command sets the y-coordinate of the turtle.

SETY 30

PRINT

The PRINT command prints a message to the console.

PRINT "Hello, Tortoys!"

SET

The SET command is used to set variables.

SET A 10
SET B A+5

CLOSE

The CLOSE command closes the turtle screen.

CLOSE

DONE

The DONE command completes the turtle graphics program.

DONE

Comments

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

Variables in Tortoys are used to store values. They are defined using the SET command.

SET A 10
SET B A+5

Example Program

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!


Contributing

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.

About

Tortoys : A programming language made for kids to learn about programming and some turtle programming

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages