diff --git a/SimpleAddition/alternative_sum.py b/SimpleAddition/alternative_sum.py new file mode 100644 index 0000000..af40dfd --- /dev/null +++ b/SimpleAddition/alternative_sum.py @@ -0,0 +1,9 @@ +try: + x = float(raw_input("Enter first number: ")) + y = float(raw_input("Enter second number: ")) + + result = x+y + print('Result: ' + str(result)) + +except ValueError: + print("Error. Input cannot be interpreted as a number")