Answer:
Nobody knows for sure who built Edinburgh Castle. It is known that the site has been used by humans since the 9th century BC. However, most of the present buildings date from the early 17th century, as the previous buildings on the site were destroyed by bombardment.