To determine the number of sides \( n \) in the polygon, we can use the formula for the sum of the interior angles of a polygon, which is given by:
\[ S = (n - 2) \times 180^\circ \]
According to the problem, the polygon has two right angles (which are each \( 90^\circ \)) and the remaining angles are each \( 150^\circ \). Let's denote the number of remaining angles as \( n - 2 \) since there are two angles that are \( 90^\circ \).
- The total sum of the interior angles can also be expressed as the sum of all the angles:
- Total from the right angles: \( 2 \times 90^\circ = 180^\circ \)
- Total from the remaining angles: \( (n - 2) \times 150^\circ \)
Thus, we can write the equation for the sum of the angles:
\[ 180^\circ + (n - 2) \times 150^\circ = (n - 2) \times 180^\circ \]
- Now, let's simplify this equation:
- Expanding both sides:
\[ 180 + 150(n - 2) = 180(n - 2) \]
- Distributing on both sides:
\[ 180 + 150n - 300 = 180n - 360 \]
- Simplifying gives:
\[ 150n - 120 = 180n - 360 \]
- Now, let's combine like terms:
\[ -120 + 360 = 180n - 150n \]
\[ 240 = 30n \]
- Finally, solving for \( n \):
\[ n = \frac{240}{30} = 8 \]
Thus, the number of sides \( n \) of the polygon is
\[ \boxed{8} \]