You are doing great dervl3nn4n. Only one week and already doing a calculator in Python? Congratulations!
The solution is simple, let me explain the error first. When you ask for an input, normally it is always a string, your are actually storing strings in
num2, that is why when you use the + operator, it ‘adds’ (concatenate) these values.
So, what you need to do is convert these strings into numbers (integers or floats) to add them.
There is a built-in function to do that,
int(). You can see the reference here.
Then, a possible solution would be:
#Python Calculator by dervl3nn4n
num1 = input("Enter number: ")
operator = input("Enter operator +,-,*,/: ")
num2 = input("Enter another number: ")
if (operator == '+'):
print('Your math:' , num1, '+', num2)
print('Result:', int(num1) + int(num2))
Try it out!