Python Calculator

The code here is still not finished, subject to future refinements. Hey, it’s a good start anyway.

Code:

printĀ ("KalkulatorĀ v1")

def add(x,y):
  return (x + y)

try:
  num1 = int(input("Insert 1st number: "))
except ValueError:
  print ("Not a valid number")
  num1 = int(input("Insert 1st number: "))

num2 = int(input("Insert 2nd number: "))

print ("1st number is ",num1," while 2nd number is ",num2,"." )

print ("The answer is: ",add(num1,num2),".")

# oper = input("Insert operator: ")

# References URL: https://www.programiz.com/python-programming/examples/calculator