My First Addon- Math

This is my first attempt at python and scripting so any help will be appreciated. If I have read things right this should be a simple script to add two number.

PHP Code:
# This program adds two numbers

num1 1.5
num2 
6.3

# Add two numbers
sum float(num1) + float(num2)

# Display the sum
print('The sum of {0} and {1} is {2}'.format(num1num2sum)) 

what I want is to be able to set num1 and num2 from within kodi skin with a simple setproperty or setstring.
and instead of print I would like it to output to a string or property.

I have no past experience with python or how how to make it talk to kodi. Any advice on where to start looking to make this happen?