Arithmetic Operations

Animal Script provides a range of arithmetic operations for performing calculations in a fun and educational manner. These operations mimic the behaviors of various animals, adding an element of whimsy to the learning process.

Elephants represent addition, and the syntax for addition in Animal Script is Elephants n + m, where n and m are the numbers to be added. For example, Elephants 3 + 4 will produce the output Trumpets 7, indicating that the elephants are trumpeting, symbolizing the result of the addition.

Frogs symbolize subtraction, and the syntax for subtraction is Frogs n - m. For instance, Frogs 5 - 2 will result in Croaks 3, indicating that the frogs are croaking, representing the result of the subtraction.

Bees represent multiplication, and the syntax for multiplication is Bees n * m. For example, Bees 3 * 4 will yield Buzzes 12, signifying the buzzing sound made by bees and indicating the result of the multiplication.

Lions denote division, and the syntax for division is Lions n / m. For instance, Lions 10 / 2 will output Roar 5.0, indicating the roar of a lion and symbolizing the result of the division.

Giraffes symbolize exponentiation, and the syntax for exponentiation is Giraffes n ** m. For example, Giraffes 2 ** 3 will produce Stretches 8, indicating the stretching of a giraffe's neck and representing the result of the exponentiation.

Kangaroos represent modulus, and the syntax for modulus is Kangaroos n % m. For instance, Kangaroos 10 % 3 will result in Hops 1, indicating the hopping of a kangaroo and representing the result of the modulus operation.

Rhinos represent floor division, and the syntax for floor division is Rhinos n // m. For example, Rhinos 10 // 3 will yield Charges 3, symbolizing the charging of a rhino and representing the result of the floor division.

Zebras denote true division, and the syntax for true division is Zebras n / m. For instance, Zebras 10 / 3 will output Gallops 3.3333, indicating the galloping of a zebra and representing the result of the true division.

Pandas symbolize bitwise XOR, and the syntax for bitwise XOR is Pandas n ^ m. For example, Pandas 5 ^ 3 will result in Rolls 6, signifying the rolling behavior of a panda and representing the result of the bitwise XOR operation.

Lemurs represent bitwise OR, and the syntax for bitwise OR is Lemurs n | m. For instance, Lemurs 5 | 3 will yield Leaps 7, indicating the leaping behavior of a lemur and representing the result of the bitwise OR operation.

Owls denote bitwise AND, and the syntax for bitwise AND is Owls n & m. For example, Owls 5 & 3 will output Hoots 1, symbolizing the hooting of an owl and representing the result of the bitwise AND operation.

These operations provide a playful and engaging way to learn and practice arithmetic concepts in Animal-Script, making it both fun and educational.

Last updated