Python Program to Add Two Numbers

This content was proof-read by Grammarly. You can Try Grammary for FREE

This Python program demonstrates how you can add two numbers in python and display it using the print() function.

Python Program to Add Two Numbers

Python program to add two numbers

# python program to add two numbers
number1 = 898.2
number2 = 111.6

# Add two numbers and store it in sum
sum = number1 + number2

# Display the sum using print
print('The sum of {0} and {1} is {2}'.format(number1, number2, sum))


Are you a .NET Developer planning to integrate GraphQL for .NET in your Application? Check out this book BUY & DOWNLOAD GRAPHQL.NET COOKBOOK
The sum of 898.2 and 111.6 is 1009.8000000000001

In this program , the variables number1 and number2 contains the numeric values that needs to be added. These two variable values are added and the result is stored in the variable sum. This is then displayed using the built-in python function.

%d bloggers like this: