Coder Social home page Coder Social logo

periodicode's Introduction

PeriodiCode

PeriodiCode - Toy Language Description:

PeriodiCode is a toy programming language that combines elements from the periodic table with coding concepts, providing an interactive and playful coding experience.

The language operates within a data dictionary called "data," where variables and their corresponding values are stored. Users can declare variables and define functions using the names of chemical elements, adding a whimsical touch to their code. Here are some key features and functions of PeriodiCode:

Code Snippets:

  1. Hydrogen(x): Allows users to declare variables and store their values in the data dictionary.

    Hydrogen x 10;
  2. Iron(variable): Retrieves and prints the value of a given variable from the data dictionary.

    Iron x;
  3. Carbon(numbers): Calculates the sum of a list of numbers or variables, replacing variables with their corresponding values from the data dictionary.

    Carbon x 5 3;
  4. Oxygen_for(start, end): Prints a range of numbers specified by the "start" and "end" arguments, considering variables and converting values as needed.

    Oxygen_for 1 5;
  5. Oxygen_iter(sequence): Iterates over a sequence of elements, either a list or a variable, and prints each element.

    Oxygen_iter sequence;

In addition to these functions, here's an example of how you can use PeriodiCode to add two numbers:

Hydrogen num1 5;
Hydrogen num2 10;
Carbon "num1" "num2"

The above code declares two variables, num1 and num2, assigns them values, and then uses the Carbon function to calculate their sum. The result will be printed as 15.

PeriodiCode offers a playful and engaging environment for beginners or anyone seeking a creative and whimsical programming experience.

periodicode's People

Contributors

debadityamalakar avatar

Stargazers

Huỳnh Trần Khanh avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.