Skip to main content

Print a pattern that can have 3 shapes

Project description

Package for Printing a Pattern with 3 Possible Forms This package has only one module named patron_ElioAmado_expoFP.py.

This Python module defines a function called elio_Patron() which is responsible for printing a pattern in the console. The generated pattern varies according to the specified input parameters. The function accepts four parameters:

alt: Specifies the height of the pattern and must be an integer. frm: Can take three values: “Up”, “Down”, or “Mixed”. Determines the form of the generated pattern. rell: Indicates the filling character to be used in the middle of the pattern. Must be a single character. nom: Is a word or phrase that is printed in the pattern. The way it is printed depends on the value of “frm”. The elio_Patron() function consists of two internal functions:

ptrferiaLine(): This function creates a pattern line according to the provided parameters. It calculates the required spaces, the length of the text to print, and uses a list of special characters to shape the pattern.

ptrferiaimpr() and ptrferiaimprMez(): These functions print the pattern in the console according to the specified form (“Up”, “Down”, or “Mixed”). They dynamically adjust the height, the amount of filling, and other parameters to create the desired pattern.

The main function elio_Patron() prompts the user to input the necessary parameters and then generates the pattern according to the specifications. If the “Mixed” form is selected, the pattern is generated iteratively, gradually reducing the height and length of the text.

Finally, the function uses Python’s standard library to pause execution for a short period of time, resulting in a more animated visualization of the pattern in the console.

This script is interactive.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

patron_ElioAmado_expoFP-0.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

patron_ElioAmado_expoFP-0.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file patron_ElioAmado_expoFP-0.1.tar.gz.

File metadata

  • Download URL: patron_ElioAmado_expoFP-0.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for patron_ElioAmado_expoFP-0.1.tar.gz
Algorithm Hash digest
SHA256 29f07be98915dfad21af35698aa2cf0224c50b0106e3f5af3381c78b6d2a05d6
MD5 1526135974b5f557895e10b34ff91a7a
BLAKE2b-256 8e30c1f0f2ef91c9a7075006d7e793e95aa6516910674ef8fa22421d51c6d00b

See more details on using hashes here.

File details

Details for the file patron_ElioAmado_expoFP-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for patron_ElioAmado_expoFP-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90f24bed5cd50dff02b10f8ec5b62423a616c823e1fe04d7bcd44ec359a573c3
MD5 12c79db2791beb9412d171eb84f1336b
BLAKE2b-256 299161113e7b226a334fa476f5e341c6a6096cab424209e7feddde0edebcaeb3

See more details on using hashes here.

Supported by

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