No project description provided
Project description
Animal-Script
AnimalScript is a playful and educational programming language designed for fun and learning. It features a syntax inspired by animals and provides an engaging environment for experimenting with programming concepts.
Installation
You can install AnimalScript using pip:
pip install animal-script
Usage/Examples
To use AnimalScript, simply run the animal-script command followed by your AnimalScript code.
For example:
animal-script my_script.animal
Replace my_script.animal with the path to your AnimalScript file.
Manual Execution:
python -m animal_script.interpreter my_script.animal
Lessons
Variable Assignment:
Syntax:
<Animal> <variable_name> = <value>
Example:
Dolphin age = 10
Arithmetic Operations:
Animal | Operation | Syntax | Example | Output |
---|---|---|---|---|
Elephants | Addition | Elephants n + m |
Elephants 3 + 4 |
Trumpets 7 |
Frogs | Subtraction | Frogs n - m |
Frogs 5 - 2 |
Croaks 3 |
Bees | Multiplication | Bees n * m |
Bees 3 * 4 |
Buzzes 12 |
Lions | Division | Lions n / m |
Lions 10 / 2 |
Roar 5.0 |
Giraffes | Exponentiation | Giraffes n ** m |
Giraffes 2 ** 3 |
Stretches 8 |
Kangaroos | Modulus | Kangaroos n % m |
Kangaroos 10 % 3 |
Hops 1 |
Rhinos | Floor Division | Rhinos n // m |
Rhinos 10 // 3 |
Charges 3 |
Zebras | True Division | Zebras n / m |
Zebras 10 / 3 |
Gallops 3.3333 |
Pandas | Bitwise XOR | Pandas n ^ m |
Pandas 5 ^ 3 |
Rolls 6 |
Lemurs | Bitwise OR | Lemurs n | m |
Lemurs 5 | 3 |
Leaps 7 |
Owls | Bitwise AND | Owls n & m |
Owls 5 & 3 |
Hoots 1 |
Control Statements:
For Loop:
Syntax:
Monkeys <variable_name> <start> <end> [<step>]
Example:
Monkeys i 0 5
If Condition:
Syntax:
Tiger <condition>
Example:
Tiger i < 10
Print Statement:
Syntax:
Whale <message>
Example:
Whale "Hello, World!"
Input Statement:
Syntax:
Dolphin <variable_name>
Example:
Dolphin age
Comments:
Syntax:
#<comment>
Example:
# This is a comment
Concatenation:
Syntax:
<Animal> <variable_name> = <value1> + <value2>
Example:
Elephants message = "Hello" + "World"
If Statement with Print:
Syntax:
Tiger <condition>
Whale <message>
Example:
Tiger age > 18
Whale "You are an adult"
If Statement with Variable:
Syntax:
Tiger <condition>
Dolphin <variable_name>
Example:
Tiger age < 18
Dolphin underage
For Loop with Print:
Syntax:
Monkeys <variable_name> <start> <end> [<step>]
Whale <message>
Example:
Monkeys i 1 5
Whale "Iteration: i"
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are always welcome!
See contributing.md
for ways to get started.
If you'd like to contribute to AnimalScript, feel free to submit pull requests or open issues on the GitHub repository: https://github.com/adnanattar/animal-script
Frequently Asked Questions (FAQ)
What is AnimalScript?
AnimalScript is a domain-specific language (DSL) designed to mimic natural language syntax, making it intuitive and easy to understand. It is primarily used for scripting and automation tasks.
How do I install AnimalScript?
You can install AnimalScript using pip:
pip install animal-script
How do I use AnimalScript?
AnimalScript files typically have a .animal
extension. You can run an AnimalScript file using the animal-script
command followed by the filename:
animal-script my_script.animal
What are some common control statements in AnimalScript?
AnimalScript provides intuitive control statements that mimic natural language. Some common ones include:
Monkeys
: For loopTiger
: If conditionDolphin
: Input statementWhale
: Print statement
Can I contribute to AnimalScript?
Yes, contributions are welcome! Feel free to submit pull requests or open issues on the GitHub repository.
How do I report a bug or suggest a feature?
You can report bugs or suggest features by opening an issue on the GitHub repository.
Where can I find more information about AnimalScript?
You can find more information, documentation, and examples on the AnimalScript GitHub repository: link.
Is there a code of conduct for contributing to AnimalScript?
Yes, please refer to the CODE_OF_CONDUCT.md file for guidelines on contributing to AnimalScript.
How can I get help or support?
If you need help or have questions about AnimalScript, you can reach out to the community on the GitHub repository or the official support channels.
Can I use AnimalScript for commercial projects?
Yes, AnimalScript is open-source and available under the MIT License. You are free to use it for commercial projects.
How do I uninstall AnimalScript?
You can uninstall AnimalScript using pip:
pip uninstall animal-script
If you have any further questions or need assistance, don't hesitate to ask!
Authors
Features
- Natural Language Syntax: AnimalScript uses a natural language syntax that mimics everyday speech, making it easy to read and write.
- Control Statements: Intuitive control statements such as
Monkeys
for loops,Tiger
for conditional statements,Dolphin
for user input, andWhale
for output. - Arithmetic Operations: Supports basic arithmetic operations such as addition, subtraction, multiplication, and division.
- Variable Management: Easily manage variables and store values for later use.
- Error Handling: Provides informative error messages for invalid input or operations.
- File Input: Run AnimalScript files directly from the command line.
- Extensible: Easily extendable with custom functions and modules.
- Open Source: AnimalScript is open-source and available under the MIT License.
- Cross-Platform: Runs on any platform that supports Python.
These are just a few of the features that make AnimalScript a powerful and versatile scripting language.
Support
For any questions or support, please contact support@androtechbuddy.com.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for animal_script-0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11558b55729104b59362358a8362f271aa869fbec09911d2f4e6711571be6d39 |
|
MD5 | 00db1d564f33542ac8877bb889705326 |
|
BLAKE2b-256 | 134300098f5dc6ad1ac1a36e13641dd356b5adc93c32408a1f4920b542ee639e |