1) Write a Python program to find Sum, Difference and Product of two numbers entered by user.
a = int(input("Enter first number: "))
b = int(input("Enter second number: "))
sum = a + b
difference = a - b
product = a * b
print("Sum is =", sum)
print("Difference =", difference)
print("Product =", product)
2) Write a Python program to find Area and Perimeter of Rectangle.
length = float(input("Enter length of rectangle: "))
breadth = float(input("Enter breadth of rectangle: "))
area = length * breadth
perimeter = 2 * (length + breadth)
print("Area of Rectangle =", area)
print("Perimeter of Rectangle =", perimeter)
3) Write a Python program to find Area and Perimeter of Square.
Side = float(input("Enter the Side of Square: "))
area = Side * Side
perimeter = 4 * Side
print("Area of Square =", area)
print("Perimeter of Square =", perimeter)
4) Write a Python program to find Area and Circumference of Circle.
r = float(input("Enter the Radius of Circle: "))
area = 3.14*r*r
Circumference = 2*3.14*r
print("Area of Circle =", area)
print("Circumference of Circle =", Circumference)
5) Write a Python program to find the power of one number to the other and store the result in
a variable.
b = int(input("Enter number in base: "))
p = int(input("Enter number in power: "))
Solution=b**p
print(“Solution is =", Solution)
6) Write a Python program to convert the value of a given temperature from Fahrenheit to
Celsius. Given C=(F − 32) × 5/9
F = float(input("Enter temperature in Fahrenheit: "))
C=(F − 32) *5/9
print(“Temperature in Celsius =", C)
7)
8) Write a Python program to convert a given distance from Kilometers to Centimeter.
K = float(input("Enter distance in Kilometers: "))
C=K*100000
print(“Distance in Centimeter =", C)
9) Write a Python program to convert a given weight from Kilogram to Gram.
K = float(input("Enter Weight in Kilogram : "))
G=K*1000
print(“Weight in Gram =", G)
10) Write a Python Program to find Simple Interest. Given SI=(P*R*T)/100
P = float(input("Enter the Principal amount: "))
R = float(input ("Enter the Rate of Interest: "))
T= float(input("Enter the Time: "))
SI=(P*R*T)/100
print("Simple Interest is =", SI)