Saturday, May 21, 2022

Python Program Add Two Numbers With User Input

 

Python Program to Add Two Numbers 

Add Two Numbers With User Input

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

Example Program.

# Store input numbers

num1 = input('Enter first number: ')

num2 = input('Enter second number: ')


# Add two numbers

sum = float(num1) + float(num2)


# Display the sum

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

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