Center of rectangle

Using the definitions

class Point:
    """attributes: x, y"""

class Rectangle:
    """attributes: width, height, corner"""

write a function

find_center(r)

that returns a point containing the coordinates of the center of a rectangle rr. For example, the center of a rectangle of width 100100, height 200200, and lower-left corner (0,0)(0, 0), is the point (50,100)(50, 100).

Input

The input consists of several rectangles (four non-negative integer numbers: the width, the height, and the coordinates of the lower-left corner).

Output

For each rectangle, print the coordinates of the center (two non-negative real numbers).

Problem information

Author: Gabriel Valiente

Generation: 2026-01-25T17:10:27.422Z

© Jutge.org, 2006–2026.
https://jutge.org