{"id":22749,"date":"2021-09-27T15:43:14","date_gmt":"2021-09-27T10:13:14","guid":{"rendered":"https:\/\/python-programs.com\/?p=22749"},"modified":"2021-11-22T18:35:37","modified_gmt":"2021-11-22T13:05:37","slug":"python-program-for-maximum-number-of-2x2-squares-that-can-be-fit-inside-a-right-isosceles-triangle","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-for-maximum-number-of-2x2-squares-that-can-be-fit-inside-a-right-isosceles-triangle\/","title":{"rendered":"Python Program for Maximum Number of 2\u00d72 Squares That Can be Fit Inside a Right Isosceles Triangle"},"content":{"rendered":"

In the previous article, we have discussed Python Program to Find Slope of a Line<\/a>
\nGiven the base of the isosceles triangle, the task is to find the count of the maximum number of 2*2 squares required that can be fixed inside the given isosceles triangle.<\/p>\n

The side of the square must be parallel to the base of the given isosceles triangle.<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given base of triangle = 8<\/pre>\n

Output:<\/strong><\/p>\n

The maximum number of 2*2 squares required that can be fixed inside the given isosceles triangle =  6<\/pre>\n

Explanation:<\/strong><\/p>\n

\"\"<\/p>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given base of triangle = 6<\/pre>\n

Output:<\/strong><\/p>\n

The maximum number of 2*2 squares required that can be fixed inside the given isosceles triangle =  3<\/pre>\n

Program for Maximum Number of 2\u00d72 Squares That Can be Fit Inside a Right Isosceles Triangle in python:<\/h2>\n

Below are the ways to find the count of the maximum number of 2*2 squares required that can be fixed inside the given isosceles triangle:<\/p>\n