Answer and Explanation: No, Stephen King's It is not based on a true story. King had the idea for It when looking at an old wooden walking bridge in 1978 near his home in Boulder, Colorado.
Pennywise is female. In Stephen King's book, in the end, Pennywise's true form is a spider that lays eggs to reproduce itself. Throughout the book, It is generally referred to as male due to usually appearing as Pennywise.
As for the Hotel Cortez, it takes inspiration from another real life horror story, that of the Cecil Hotel. This real Los Angeles hotel opened in 1927, a year after March opened the Hotel Cortez, and it has a history of violence, death and mystery.