Kanye West has turned college lecturer as part of his 250-hour community service sentence for attacking a photographer.

The Stronger hitmaker appeared at Los Angeles Trade Technical College (Lattc) over the weekend (20-21Sep14) to speak to 40 students in the digital communications department as well as troubled youths who are participating in a summer scheme to encourage education.

West discussed his inspirations, struggles in the music and fashion industry and the importance of schooling.

The visit is part of the rapper's community service punishment following a misdemeanor battery conviction for attacking a photographer outside Los Angeles International airport last year (13).

More: Kanye Blames Pap Fight On Grandfather Dying

Student Andre Pitts Iii, who was present for West's lecture, tells Vice.com, "We didn't know (West would be giving the lecture). None of the students were notified of his presence before hand... It went on for about an hour and a half and Kanye discussed a lot of things but mainly about his inspirations.... He also discussed Steve jobs, 2Pac and his grandfather... I've listened to Kanye since I was younger but I can't rate him as a teacher because he didn't come to teach a fashion class, he just spoke about his inspirations. He didn't try to be a teacher, he simply spoke about how life really is... He didn't want to talk to anybody personally or take personal photos with anybody."

It is reportedly West's fourth visit to the college.