7. Building a Basic Calculator - tomaslt99/Python-language-tutorials GitHub Wiki
Code:
num1 = input("Enter a number:")
num2 = input("Enter another number:")
# convert num1 & num2 variables into strings.
# Usimg "int"function can accept only whole numbers (0, 1, 3, 5,)
result = int(num1) + int(num2)
print(result)
num1 = input("Enter a number:")
num2 = input("Enter another number:")
# convert num1 & num2 variables into strings.
# Using "Float" can accept numbers with decimals also negetive numbers.
result = float(num1) + float(num2)
print(result)