A student is considering using compounds P and Q together to make a condensation polymer. Their structures are shown in the table.
| Compound | Structure |
|---|---|
| P | HO–CH₂–CH₂–CH₂–OH |
| Q | HOOC–CH₂–COOH |
Explain whether compounds P and Q have the functional groups needed for repeated joining to form a condensation polymer.