Addition Program


This program is a simple Python script that demonstrates how to perform basic arithmetic operations in Python. The script starts by initializing two variables, "a" and "b", to the values 20 and 30 respectively. Then, it performs an addition operation on the two variables and assigns the result to the variable "result". Finally, the script uses the print() function to display a message "Addition of two numbers" and the result of the addition operation, which is "20 and 30 = 50". This program is useful for understanding the basic syntax of Python and how to perform basic mathematical operations in the language.

Source Code

a   = 20
b   = 30
result=a+b
print("Addition of two numbers")
print(a," and ",b," = ",result)
To download raw file Click Here

Output

Addition of two numbers
20  and  30  =  50