Saturday, May 21, 2022

Python Code to Add Two 2 Numbers

Python Program to Add Two Numbers

In this program, you will learn to add two numbers and display it using print() function.

Example the addtwonumbers.py.

# This program adds two numbers

num1 = 1.5
num2 = 6.3

# Add two numbers
sum = num1 + num2

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

Output

The sum of 1.5 and 6.3 is 7.8


Need and Python Program and Expert to develop anything Click here.

Get more Earning online Just Follow This Link Bonus

No comments:

Post a Comment

Ads