Skip to main content

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

  1. triangle: A right-angled triangle
  2. inverted_triangle: An inverted right-angled triangle
  3. pyramid: 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

simple_star_patterns-0.1.0.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simple_star_patterns-0.1.0-py3-none-any.whl (1.9 kB view details)

Uploaded Python 3

File details

Details for the file simple_star_patterns-0.1.0.tar.gz.

File metadata

  • Download URL: simple_star_patterns-0.1.0.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for simple_star_patterns-0.1.0.tar.gz
Algorithm Hash digest
SHA256 492d021bec52c4c3c6b0911fdea3e511580d0aa29a69e51db34a0ab7788c07e6
MD5 47a627388f6647eb82b298217e45839b
BLAKE2b-256 e4980730d444d716c83bde8168f0eca891f7128cdf6c25e36000b73a37df26b4

See more details on using hashes here.

File details

Details for the file simple_star_patterns-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_star_patterns-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7bb738417c7bf096a400ad9958612c573f1878592d8b7f981936acba79efaa6
MD5 f9921625a47192f5c1b56b0ff85cdcc3
BLAKE2b-256 14568d65e231250faa44265612b6c8322ed4295eadd43189a837df98638d4ace

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page