Musk attended the English-speaking Waterkloof House Preparatory School, and later graduated from Pretoria Boys High School. He did his whole primary and secondary education in his hometown of South Africa. The years were lonely and brutal, from his descriptions. He was bullied every day.
At an early age (10), his parents divorced. During this time, he bought himself a PC and a program book and self taught himself how to program within a week. At age 12, he programmed a basic code for a video game called Blastar. He sold it for 500$. At 17, Musk moved to Canada to avoid serving in the South African military, whose main duty in the late 1980s was enforcing apartheid. He would later obtain Canadian citizenship through his mother.
Click here to play Blastar
After emigrating to Canada, Musk enrolled in Queen's University in Kingston, Ontario.