diff --git a/functions.py b/functions.py new file mode 100644 index 0000000..d097fec --- /dev/null +++ b/functions.py @@ -0,0 +1,15 @@ +def pattern(rows): + """ + This function prints a pattern of numbers where each row starts + from the current row number down to 1, separated by spaces. + The number of rows is determined by the 'rows' parameter. + + """ + for i in range(rows, 0, -1): + for j in range(i, 0, -1): + print(j, end=" ") + print() + +pattern(5) + +print(pattern.__doc__)