Meek Mill was due in court today for a sentencing hearing stemming from parole violations but before he went to the courtroom, the MC visited the Boys' Latin School in his hometown of Philadelphia. Speaking to the high school students, Meek offered words of encouragement and how growing up in a single-parent home motivated him to do better.

"I come from a single-parent home and I always wanted to be the man in the house because there wasn't a man in the house where I come from," he said. "That gave me my motivation to take care of my family. That hit me hardest as a kid, not seeing a man there to provide for my mother.

Meek also spoke out against living a crime-ridden life and warned that a prison sentence doesn't make you cool. "You don't gotta go to jail to be a tough guy. Going to jail makes you a fool."

Dave Hardy, the charter school's CEO, complimented the 4/4 rapper on his speech. "He talked about the mistakes he made - he dropped out of school in the 10th grade," Hardy told Philly.com. "He wasn't glamorizing it. That's the kind of honesty these kids need to hear and I'm glad he was courageous enough to do that. He was very gracious. He spoke from the heart."Not everyone was a fan, however.

Philly.com columnists Ronnie Polaneczky and Jenice Armstrong ripped the rapper and the school for inviting Meek to talk and accused the rapper's motives as being exploitative. "I think the 'message' he hoped to send had nothing to do with the kids and everything to do with his piggybacking onto the wholesomeness of Boys Latin as a way to curry favor with Common Pleas Court Judge Genece Brinkley. Mill is on probation for 2009 gun and drug charges. He spent five months in prison in 2014 for violating the probation. And in December he was found guilty of violating it again."

Meek avoided jail time earlier today (Feb. 5) when a Philadelphia judge sentenced him to three months of house arrest.

See 40 Hip-Hop Albums Turning 20 in 2016

More From XXL