Write a Python Program to find the Perimeter of a Rhombus with an example. This Python example allows the Rhombus side and calculates the Rhombus perimeter.
# Python Program to find Rhombus Perimeter
rhombusSide = float(input("Enter the Rhombus Side = "))
rhombusPerimeter = 4 * rhombusSide
print("The Perimeter of a Rhombus = %.3f" %rhombusPerimeter)
Enter the Rhombus Side = 23
The Perimeter of a Rhombus = 92.000
In this Python Program, the calRhombusPerimeter function finds and returns the Rhombus Perimeter.
# Python Program to find Rhombus Perimeter
def calRhombusPerimeter(side):
return 4 * side
rhombusSide = float(input("Enter the Rhombus Side = "))
rhombusPerimeter = calRhombusPerimeter(rhombusSide)
print("The Perimeter of a Rhombus = %.3f" %rhombusPerimeter)
