A reflection moves every corner of a shape, but it never changes the shape's size. You will reflect a triangle and check that its area stays the same.
The idea. In the x-axis ; in the y-axis ; in the origin . The area of a triangle is .
Your tasks.
reflect, return the image of p in the mirror "x", "y" or "o".image with the three corners of triangle reflected in the y-axis.same_area to True if area(triangle) equals area(image).Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…