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:
Post a Comment