Find us on Facebook

Thursday, December 13, 2018

Python Program to Add Two Numbers


Expt1.                  Python Program to Add Two Numbers
Aim: Implement a program to add two numbers .
Algorithm:
1.Start
2.Input 2 numbers num1 and num 2
3.Let sum= num1+num2
4.Print sum
5.Stop

Program:
# Store input numbers
num1 = input('Enter first number: ')
num2 = input('Enter second number: ')
# Add two numbers
sum = num1+num2
# Display the sum
print sum

Output:
Enter first number: 1.5
Enter second number: 6.3
The sum of 1.5 and 6.3 is 7.8

0 Comments:

Popular Posts

Text Widget

Search This Blog

Powered by Blogger.

Blogger Pages

Like Canvas?

Sponsor

Footer Widgetized Areas

About Canvas

About Canvas

Subscribe Us

About

Text Widget

Tags

Total Pageviews

print pdf

cal

Most Popular

    TUPLES
 LIST and SLICING
      ASCII VALUE
Copyright © KTU Btech Cse Python Lab Manuals | Powered by Blogger
Design by Saeed Salam | Blogger Theme by NewBloggerThemes.com | Distributed By Gooyaabi Templates