This is a library that lets you easily print various shapes on the terminal using integer digits.
You can print a huge variety of shapes- squares, rectangles, various triangles, diamonds, circles.
You can find the package here
The source code can be found here
pip install pyPrintShape
First you need to import the library.
from pyPrintShape import printShape
The following methods can be used for the actual printing-
Print a Square pattern of integer digits.
:param side: The sidelength of square.
:type side: int
:param value:
:type value: int
:param spacing: Number of spaces between characters to make it look like an actual shape (Depends on your font tho, so adjust accordingly)
:type spacing: int
Print a Rectangle pattern of integer digits.
:param l: The horizontal side length of Rectangle.
:type l: int
:param b: The vertical side length of Rectangle.
:type b: int
:param value: The integer used to make the pattern
:type value: int
:param spacing: Number of spaces between characters to make it look like an actual shape (Depends on your font tho, so adjust accordingly)
:type spacing: int
Print a right angled triangle pattern of integer digits in the bottom left.
:param h: The height of triangle.
:type h: int
:param b: The base length of triangle.
:type b: int
:param value: The integer used to make the pattern
:type value: int
:param spacing: Number of spaces between characters to make it look like an actual shape (Depends on your font tho, so adjust accordingly)
:type spacing: int
Print a right angled triangle pattern of integer digits in the top left.
:param h: The height of triangle.
:type h: int
:param b: The base length of triangle.
:type b: int
:param value: The integer used to make the pattern
:type value: int
:param spacing: Number of spaces between characters to make it look like an actual shape (Depends on your font tho, so adjust accordingly)
:type spacing: int
Print a right angled triangle pattern of integer digits in the bottom right.
:param h: The height of triangle.
:type h: int
:param b: The base length of triangle.
:type b: int
:param value: The integer used to make the pattern
:type value: int
:param spacing: Number of spaces between characters to make it look like an actual shape (Depends on your font tho, so adjust accordingly)
:type spacing: int
Print a right angled triangle pattern of integer digits in the top right.
:param h: The height of triangle.
:type h: int
:param b: The base length of triangle.
:type b: int
:param value: The integer used to make the pattern
:type value: int
:param spacing: Number of spaces between characters to make it look like an actual shape (Depends on your font tho, so adjust accordingly)
:type spacing: int
Print a diamond pattern of integer digits.
:param d: The diagonal length of diamond.
:type d: int
:param value: The integer used to make the pattern
:type value: int
:param spacing: Number of spaces between characters to make it look like an actual shape (Depends on your font tho, so adjust accordingly)
:type spacing: int
Print a circular pattern of integer digits.
:param radius: The radius of circle.
:type radius: int
:param value: The integer used to make the pattern
:type value: int
:param spacing: Number of spaces between characters to make it look like an actual shape (Depends on your font tho, so adjust accordingly)
:type spacing: int