A simple library for printing star patterns
Project description
Simple Star Patterns
Simple Star Patterns is a Python library for printing various star (or any character) patterns. It's designed to be easy to use and understand, making it perfect for beginners learning about loops and pattern printing in Python.
Installation
You can install the Simple Star Patterns library using pip:
pip install simple-star-patterns
Usage
Here's a quick example of how to use the Simple Star Patterns library:
from simple_star_patterns import print_pattern
# Print a triangle
print_pattern('triangle', 4)
# Print an inverted triangle with '+' symbol
print_pattern('inverted_triangle', 5, '+')
# Print a pyramid with '#' symbol
print_pattern('pyramid', 3, '#')
This will output:
*
**
***
****
+++++
++++
+++
++
+
#
###
#####
Available Patterns
triangle: A right-angled triangleinverted_triangle: An inverted right-angled trianglepyramid: A symmetrical pyramid
Function Parameters
pattern: The type of pattern to print ('triangle', 'inverted_triangle', or 'pyramid')size: The number of rows in the pattern (must be a positive integer)symbol: The character to use for the pattern (default is '*')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simple_star_patterns-0.2.3.tar.gz.
File metadata
- Download URL: simple_star_patterns-0.2.3.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfa75cfd74b8dc1be0b2707a305960064ae3a55a46904c5090202186722fa9cc
|
|
| MD5 |
e7a45bb503ff13fd13edfa6affcd0786
|
|
| BLAKE2b-256 |
fbf8c19e0803f8e7f22bb96c853453c55b8edf7d28509e15627c4fad2d3f5d10
|
File details
Details for the file simple_star_patterns-0.2.3-py3-none-any.whl.
File metadata
- Download URL: simple_star_patterns-0.2.3-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
872929f6a12a210f7ccb3b50f0e31105166194d2ac8ef946fe370ffeb13ca326
|
|
| MD5 |
2ff2f74cd9b24608e512495b383eaddf
|
|
| BLAKE2b-256 |
3cfab5883d4a9493bd2ac2913cd90bf90671e6f879b1d80eefdee8c554e5826c
|