Skip to content

VaibhavCodeClub/BhashaScript

Repository files navigation

BhashaScript


Finally the first release has been published on pypi.org

A small effort to make simple Marathi programming language for fun built using python3.


Getting Started

  1. Installing the package
pip install bhashascript
  1. Starting the BhashaScript console
bhashascript
  1. Writing the very first line of code
dakhav("kay chal mag Bhava")

initial .

  1. Variable declaration
he a = 10 # Sankhya
he b = "Raje" # Shabda
he c = 1.1 # Dashank

image describing Variable declaration

variables

  1. If-Elif-Else Here, if is described as jar elif as nahijar and else as nahitar
he a = 10
jar a == 9 tar; dakhav("Nau") nahijar a == 10 tar; dakhav("Daha") nahitar dakhav("chuk")

The image of what is going on is here

conditional

  1. loop loop what do you call them in marathi. Here is jowar representing while
jowar i < 10 tar; # condition for loop
he i = i + 1; # increase the i by 1
he j = j + i; # add i to j
thamb # end of loop

jowar

  1. Break and Continue Hmmm, When loops and conditional statements are there then break and continue must be there right.
he i = 0
he j = 0

jowar i < 10 tar;
he i = i + 1;
jar i == 4 tar chal; # continue
he j = j + 1; # increase j by i
jar i == 8 tar tod; # break
thamb

continue break

  1. Functions

Are you interested in functions. Yes we do have them both inbuilt as well as user defined. The keyword used is karya for function

  • User defined
karya berij(x,y); # function to add 2 arguments
dakhav (x + y); # pring the result
thamb # end of function
berij(100, 200) # function call

here is simple implementation of user defined function for addition of two numbers karya

  • Inbuilt as mul karya

mul karya

Below two are the raw images of what is more in the language detailed description will be added shortly

tokens

keywords

visitors