graphics.butterfly_pattern

Attributes

n

Functions

butterfly_pattern(→ str)

Creates a butterfly pattern of size n and returns it as a string.

Module Contents

graphics.butterfly_pattern.butterfly_pattern(n: int) str

Creates a butterfly pattern of size n and returns it as a string.

>>> print(butterfly_pattern(3))
*   *
** **
*****
** **
*   *
>>> print(butterfly_pattern(5))
*       *
**     **
***   ***
**** ****
*********
**** ****
***   ***
**     **
*       *
graphics.butterfly_pattern.n