Share your repls and programming experiences

← Back to all posts
calculator
ArushWadhawan (2)

an advanced calculator to calculate stuff. For addition use + , for subtraction use -, division use / , and multiplication *

Comments
hotnewtop
slickassassin03 (99)

Is it really for calculating tho

Also for fun I wrote it small and hard to read calculator :)

while True:
  try: 
    n1, op, n2 = int(input('Number: ')), str(input('\nOperator: ')), int(input('\nNumber: '))
    print(f'{n1} {op} {n2} = {eval(f"{n1}{op}{n2}")}\n')
  except TypeError: print('When it says number it means it bud')
coderorig (6)

This isn't really an advanced calculator; it's more of a simple operations calculator