Tiger6117

Area and Perimeter of the Rectangle

Dec 2nd, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. # Python Program to find Area of a Rectangle
  2.  
  3. width = float(input('Please Enter the Width of a Rectangle: '))
  4. height = float(input('Please Enter the Height of a Rectangle: '))
  5.  
  6. # calculate the area
  7. Area = width * height
  8.  
  9. # calculate the Perimeter
  10. Perimeter = 2 * (width + height)
  11.  
  12. print("\n Area of a Rectangle is: %.2f" %Area)
  13. print(" Perimeter of Rectangle is: %.2f" %Perimeter)
Add Comment
Please, Sign In to add comment