Friday, December 18, 2015

Addition of Three Numbers in Python

This sample program that I wrote using Python programming language  will find the sum of three numbers given by the user. I find Python programming easy to understand and learn I am still a beginner in Python programming so to speak. I hope you will find my work useful in learning Python programming.

If you  have some questions please send me an email at jake.r.pomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.




Sample Program Output


Program Listing


print('Addition of Three Numbers')
print('\n')
num1 = input('Enter first number: ')
num2 = input('Enter second number: ')
num3 = input('Enter third number: ')

sum = float(num1) + float(num2) + float(num3)

print('\n')
print('The sum of {0},{1} and {2} is {3}'.format(num1, num2,num3,sum))
print('\n')
print('Thank you for using this program')


No comments:

Post a Comment