From a80ab2b06fe5311a4c4cd34790848841a1bb5eaa Mon Sep 17 00:00:00 2001 From: Kuznetsov Mikhail Date: Thu, 7 Nov 2024 20:24:37 +0300 Subject: [PATCH 1/3] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=D0=B8=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8=D0=B5?= =?UTF-8?q?=20=D1=86=D0=B2=D0=B5=D1=82=D0=B0=20=D0=BF=D0=B5=D1=87=D0=B0?= =?UTF-8?q?=D1=82=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- catprinter.py | 6 +++--- printer.py | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/catprinter.py b/catprinter.py index deb16e8..29e9301 100644 --- a/catprinter.py +++ b/catprinter.py @@ -2,9 +2,9 @@ def draw_cat(): cat = r""" - /\_/\ -( o.o ) - > ^ < + /\_/\ /\–/\ /\_/\ +( o.o ) |.>ω<.| ฅ •ﻌ• ฅ + > ^ < \___/ \___/ """ return cat diff --git a/printer.py b/printer.py index 7bf25e5..bf06a45 100644 --- a/printer.py +++ b/printer.py @@ -1,18 +1,20 @@ import random colors = [ - "\033[91m", # Red - "\033[92m", # Green - "\033[93m", # Yellow - "-\033[94m", # Blue - "\033[95m", # Magenta - "\033[96m", # Cyan - "-\033[97m", # White + "\033[91m", # Red + "\033[92m", # Green + "\033[93m", # Yellow + "-\033[94m", # Blue + "\033[95m", # Magenta + "\033[96m", # Cyan + "-\033[97m", # White ] reset_color = "\033[0m" -# Делает красивый вовод сообщений def pretty_print(message): color = random.choice(colors) print(color + message + reset_color) + color = random.choice(colors) + print(color + message + reset_color) + From 7f1a5d57571bc8169c2fe1e28b3f6283332abcc6 Mon Sep 17 00:00:00 2001 From: Kuznetsov Mikhail Date: Thu, 7 Nov 2024 20:26:54 +0300 Subject: [PATCH 2/3] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D0=BA=D0=BE=D0=BD=D1=81=D1=82=D0=B0=D0=BD?= =?UTF-8?q?=D1=82=D1=8B=20=D1=86=D0=B2=D0=B5=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- printer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/printer.py b/printer.py index bf06a45..691b56b 100644 --- a/printer.py +++ b/printer.py @@ -4,10 +4,10 @@ "\033[91m", # Red "\033[92m", # Green "\033[93m", # Yellow - "-\033[94m", # Blue + "\033[94m", # Blue "\033[95m", # Magenta "\033[96m", # Cyan - "-\033[97m", # White + "\033[97m", # White ] reset_color = "\033[0m" From 06b62e078c872cadba1529221d3e57d6fcbc6540 Mon Sep 17 00:00:00 2001 From: Kuznetsov Mikhail Date: Thu, 7 Nov 2024 20:30:06 +0300 Subject: [PATCH 3/3] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=B1=D0=B5=D1=81=D0=BA=D0=BE=D0=BD=D0=B5=D1=87=D0=BD?= =?UTF-8?q?=D1=8B=D0=B9=20=D1=86=D0=B8=D0=BA=D0=BB=20=D0=B2=D1=8B=D0=B2?= =?UTF-8?q?=D0=BE=D0=B4=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- catprinter.py | 4 ++-- main.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/catprinter.py b/catprinter.py index 29e9301..a393c07 100644 --- a/catprinter.py +++ b/catprinter.py @@ -8,7 +8,7 @@ def draw_cat(): """ return cat -def draw_cats(num_cats): - for i in range(num_cats): +def draw_cats(): + while True: pretty_print(draw_cat()) diff --git a/main.py b/main.py index f6ee5aa..cebbf81 100644 --- a/main.py +++ b/main.py @@ -2,7 +2,7 @@ def main(): - draw_cats(10) + draw_cats() if __name__ == '__main__': main()