PYTHON PROGRAMS
1. WAP to input two Nos. & print their Sum.
A=int(input('Enter a No. '))
B=int(input('Enter a No. '))
C=A+B
print('Sum is ',C)
2. WAP to input two Nos. & print their Difference.
A=int(input('Enter a No. '))
B=int(input('Enter a No. '))
C=A-B
print('Difference is ',C)
3. WAP to input three Nos. & print their product.
A=int(input('Enter a No. '))
B=int(input('Enter a No. '))
C=int(input('Enter a No. '))
D=A*B*C
print('Product is ',D)
4. WAP to input two Nos. & print their +,-,*,/.
A=int(input('Enter a No. '))
B=int(input('Enter a No. '))
C=A+B
D=A-B
E=A*B
F=A/B
print('Sum is ',C)
print('Difference is ',D)
print('Product is ',E)
print('Division is ',F)
5. WAP to input a No. & print its double, cube, square and half.
A=int(input('Enter a No. '))
C=A*2
D=A*A*A
E=A*A
F=A/2
print('Double is ',C)
print('Cube is ',D)
print('Square is ',E)
print('Half is ',F)
6. WAP to input the sides of a Rectangle & print its Area and perimeter.
L=int(input('Enter Length of a Rectangle '))
B=int(input('Enter Breadth of a Rectangle '))
A=L*B
P=2*(L+B)
print('Area is ',A)
print('Perimeter is ',P)
7. WAP to input the side of a Square & print its Area and perimeter.
S=int(input('Enter Length of a Rectangle '))
A=S*S
P=4*S
print('Area is ',A)
print('Perimeter is ',P)