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.2.0.tar.gz (1.7 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.2.0-py3-none-any.whl (1.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: simple_star_patterns-0.2.0.tar.gz
  • Upload date:
  • Size: 1.7 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.2.0.tar.gz
Algorithm Hash digest
SHA256 4c8f95957dcb61688c5bf7add5b8c9f3dfa81127e290a960bdae7913add65628
MD5 bb0ef5c4c4d4f5d6d5d47711eecf083a
BLAKE2b-256 8ebbb31b8813a883ace183b85e7c0cca700f254c26f43470162b0d03f0817c71

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for simple_star_patterns-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e08551a3088dc1c14ecf10675cd1253fc934b28c874e0cb63beae4b1cdaa9235
MD5 2a4c18db5291fc7312f46531b1a5a730
BLAKE2b-256 fa0bcbce350960afa0be8d36fcab3f3d5cd5da1687fd52916a3b44e1d7f06a3c

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