|
@@ -386,4 +386,87 @@ def create_matrix(size : int = 3, up_fill : int = 0, down_fill : int = 0):
|
|
|
|
|
|
return l
|
|
|
|
|
|
-print(create_matrix(size=4, up_fill=7, down_fill=9))
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+def f(a, b, c, d):
|
|
|
+ print(a, b, c, d)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+def only_one_positive(*args):
|
|
|
+ cnt = 0
|
|
|
+ for i in args:
|
|
|
+ if i >= 0:
|
|
|
+ cnt += 1
|
|
|
+ return cnt == 1
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+def print_goods(*args):
|
|
|
+ cnt = 1
|
|
|
+ for i in args:
|
|
|
+ if type(i) == str and len(i) > 0:
|
|
|
+ print(cnt, ". ", i, sep='')
|
|
|
+ cnt += 1
|
|
|
+
|
|
|
+ if cnt == 1:
|
|
|
+ print("Нет товаров")
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+def info_kwargs(**kwargs):
|
|
|
+ print('\n'.join([f'{k} = {v}' for k, v in sorted(kwargs.items())] -> ))
|