other.magicdiamondpattern ========================= .. py:module:: other.magicdiamondpattern Functions --------- .. autoapisummary:: other.magicdiamondpattern.floyd other.magicdiamondpattern.pretty_print other.magicdiamondpattern.reverse_floyd Module Contents --------------- .. py:function:: floyd(n) Print the upper half of a diamond pattern with '*' characters. Args: n (int): Size of the pattern. Examples: >>> floyd(3) ' * \n * * \n* * * \n' >>> floyd(5) ' * \n * * \n * * * \n * * * * \n* * * * * \n' .. py:function:: pretty_print(n) Print a complete diamond pattern with '*' characters. Args: n (int): Size of the pattern. Examples: >>> pretty_print(0) ' ... .... nothing printing :(' >>> pretty_print(3) ' * \n * * \n* * * \n* * * \n * * \n * \n ' .. py:function:: reverse_floyd(n) Print the lower half of a diamond pattern with '*' characters. Args: n (int): Size of the pattern. Examples: >>> reverse_floyd(3) '* * * \n * * \n * \n ' >>> reverse_floyd(5) '* * * * * \n * * * * \n * * * \n * * \n * \n '