This repository contains a collection of pattern programs written in Python. These programs demonstrate different types of patterns that can be created using loops in Python. It covers a variety of patterns, ranging from basic ones like triangles and squares to more complex ones like pyramids and diamond shapes.
This repository is designed to provide Python code examples for generating various patterns. It can be helpful for beginners to practice and understand how loops work in Python and how they can be used to print different shapes and designs.
- A wide variety of pattern programs using loops.
- Easy-to-understand code with comments for beginners.
- Code examples demonstrating different logic like nested loops, conditionals, etc.
The following pattern programs are included in this repository:
- Square Pattern – Prints a square using
*or any other character. - Right-Angled Triangle – Prints a triangle where each line has an increasing number of
*characters. - Pyramid Pattern – Prints a pyramid shape using spaces and
*symbols. - Diamond Pattern – Prints a symmetrical diamond pattern.
- Inverted Triangle – A right-angled triangle printed in reverse.
- Number Patterns – Programs that print patterns using numbers (like Pascal’s Triangle).
- Alphabet Patterns – Pattern programs using alphabets in a variety of shapes.
- Hollow Square – A square where the inside is hollow but the edges are filled with
*.
...and many more! Check out the individual files for specific implementations.