Ask Question
10 February, 18:41

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.

+2
Answers (1)
  1. 10 February, 20:58
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers