* Noun: When referring to the state of achieving something desired or intended.
* Example: "Her success in the competition was inspiring."
* Adjective: When describing something as having achieved a desired outcome.
* Example: "The success rate of this treatment is very high."
Therefore, the part of speech depends on its function in the sentence.