Can a Pentagon Ever Have Two Right Angles?

A pentagon can have from one to three right angles but only if it is an irregular pentagon. There are no right angles in a regular pentagon.
By definition, a pentagon is a polygon that has five sides, all of which must be straight. If the sides are of equal length, the angles between the sides will also all be equal, and the pentagon will be a regular pentagon — the type most people are familiar with. If at least one of the sides has a different length than the others, the five-sided shape will be an irregular polygon
If you take a rectangle or a square and replace one of the sides with two sides that come together to a point, you will have an irregular pentagon that has two right angles. Cutting off one corner of a rectangle or square to create a fifth side creates a pentagon with three right angles.