Who Am I?

less than 1 minute read

Feel free to follow me or ask me anything. You will probably find my social media handlers below.

Well my name is Jayesh Nirve, a student,just another boring programmer. I do some basic programming, from Pune Maharashta India. Do check out my Avengers Game on my Github, you will also find a post about it below I guess. When I’m not staring at my screen I’m probably sleeping or maybe studying, the latter is kinda unlikely.

My first ever code snippet:

import re
print("Maja Calculator")
print("Type 'band' to exit\n")
run = True
previous = 0


def performmath():
    global run
    global previous
    equation = ""
    if previous == 0:
        equation = input("Enter Equation:")
    else:
        equation = input(str(previous))

    if equation == 'band':
        print("Don't use calculator for homework :)")
        run = False
    elif equation == "":
        run = True
    elif equation.isalpha() == True:
        run = False
        print("Letters not Allowed")
    else:
        equation = re.sub('[a-zA-Z#$%@!&]', '', equation)

        if previous == 0:
            previous = eval(equation)
        else:
            previous = eval(str(previous)+equation)


while run:
    performmath()

Yep I use Marathi/Hindi words in my code.