Ask Question
17 November, 13:45

Two polygons are said to be similar if their corresponding angles are the same or if each pair of corresponding sides has the same ratio. Write the code to test if two rectangles are similar when the length and width of each are provided as integer values. For example:If the rectangles have lengths of 10 and 8, the ratio would be 1.25.

+3
Answers (1)
  1. 17 November, 17:28
    0
    Let's do this in Python. We will assume there are 4 user inputs. L1, W1 are the length and width of the first rectangle, respectively. L2, and W2 are the length and width of the 2nd rectangle. We can check if they are similar by comparing their ratios.

    def check_similar (L1, W1, L2, W2):

    if L1/L2 = = W2/W2:

    return True

    else:

    return False
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Two polygons are said to be similar if their corresponding angles are the same or if each pair of corresponding sides has the same ratio. ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers