logoStarPatterns
Back to Patterns

Alphabet O Pattern

Pattern Result

*****
* *
* *
* *
* *
* *
*****

Code Implementation

Explanation

The Alphabet O Pattern creates a shape that resembles the letter O using asterisks. The pattern consists of three parts: the top curved part, the middle part, and the bottom curved part. The top and bottom curved parts are created by placing spaces at the first and last positions, with stars in between. The middle part is created by placing stars at the first and last positions, with spaces in between. This creates the distinctive oval shape of the letter O with a hollow center.