The city in which the government meets is called the capital. The building within the capital city where the government meets is called the capitol. Sacramento is the capital of California, but the building in which the legislature and governor work is the Capitol. Capitols, such as California's, often have a dome and a round rotunda below the dome. Think of a capitol as a building with a round rotunda, like an O.
Yes it is spelled with an A when referring to a states assembly point and it's spelled with an O when referring to direction of grammar.
Thanks! Your answer is awaiting moderation.