Software & Finance

Python - Add Two Numbers


Here is the python source code to add two numbers. This code is tested with Python version 2.6


        print "Program to add two numbers"
        print "Enter First Number:",
        a = 0
        a = input()
        print "Enter Second Number:",
        b = 0
        b = input()
        print "Result: ", a + b
        #sample output
        #Enter First Number: 10
        #Enter Second Number: 20
        #Result: 30