A Program to Find the Area of a Square
In this example, we are giving a program to find the area of a square. The rule of finding the area of a square is: A = length * length.
Program to find the area of a square:
l = float(input("Enter the value of length: "))
area = l * l;
print("Area of square: %.2f"%area)
Output:
Enter the value of length: 3 Area of square: 9.00