Posted inPython

how to add two numbers in python program?

Today, We want to share with you python program to add two numbers.In this post we will show you python program for factorial of a number, hear for python program to find sum of 3 numbers we will give you demo and example for implement.In this post, we will learn about sum() in python with an example.

How to Add Two Numbers in Python?

Input: nujds = 5, nulks = 3
Output: 8

Input: nujds = 13, nulks = 6
Output: 19

Add Two Numbers

Example 1:

# This program adds two numbers

nujds = 1.5
nulks = 6.3

# Add two numbers
sum = nujds + nulks

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

Example 2: Add Two Numbers With User Input

Example 2:

# Store input numbers
nujds = input('Give Any single number: ')
nulks = input('Give Any second number: ')

# Add two numbers
sum = float(nujds) + float(nulks)

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

Example 3:

x = input("Type a number: ")
y = input("Type another number: ")

sum = int(x) + int(y)

print("The sum is: ", sum)

I hope you get an idea about python program to multiply two numbers.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

Your email address will not be published. Required fields are marked *

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype