From 700492ca5fa42f963539e904d7f94c9802fcfa1a Mon Sep 17 00:00:00 2001 From: cheykrym Date: Mon, 14 Oct 2024 21:47:19 +0300 Subject: [PATCH] Update config.py, system.py, and 5 more files... --- app/utils/config.py | 1 + app/utils/system.py | 10 ++++++++++ app/zadachi/zadacha1.py | 0 app/zadachi/zadacha2.py | 0 app/zadachi/zadacha3.py | 0 main.py | 28 ++++++++++++++++++++++++++++ requirements.txt | 2 ++ 7 files changed, 41 insertions(+) create mode 100644 app/utils/config.py create mode 100644 app/utils/system.py create mode 100644 app/zadachi/zadacha1.py create mode 100644 app/zadachi/zadacha2.py create mode 100644 app/zadachi/zadacha3.py diff --git a/app/utils/config.py b/app/utils/config.py new file mode 100644 index 0000000..c5b5026 --- /dev/null +++ b/app/utils/config.py @@ -0,0 +1 @@ +debug=0 diff --git a/app/utils/system.py b/app/utils/system.py new file mode 100644 index 0000000..b2b3aac --- /dev/null +++ b/app/utils/system.py @@ -0,0 +1,10 @@ +import os +import platform + +def clear_console(): + """Очистить консоль в зависимости от операционной системы.""" + os_name = platform.system() + if os_name == 'Windows': + os.system('cls') + else: + os.system('clear') diff --git a/app/zadachi/zadacha1.py b/app/zadachi/zadacha1.py new file mode 100644 index 0000000..e69de29 diff --git a/app/zadachi/zadacha2.py b/app/zadachi/zadacha2.py new file mode 100644 index 0000000..e69de29 diff --git a/app/zadachi/zadacha3.py b/app/zadachi/zadacha3.py new file mode 100644 index 0000000..e69de29 diff --git a/main.py b/main.py index e69de29..db18c08 100644 --- a/main.py +++ b/main.py @@ -0,0 +1,28 @@ + +from app.utils.config import debug +from app.utils.system import clear_console +#from test_module import * + + +def main_menu(): + clear_console() + while True: + print('\nMain Menu:') + print('1. Start') + print('0. Exit') + + choice = input('Select an option: ') + + clear_console() + if choice == '1': + #return test() + return + + elif choice == '0': + print('Exiting program...') + break + else: + print('Invalid option') + +if __name__ == "__main__": + main_menu() diff --git a/requirements.txt b/requirements.txt index e69de29..49ef8f1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -0,0 +1,2 @@ +numpy==2.1.2 +matplotlib==3.9.2