From ce6cb24f77fe1ab6b1a83ffbafd917be22cb06fd Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 15:26:04 +0300 Subject: [PATCH 01/20] Add license --- LICENSE | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d1f261d --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2025 Snaffys + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + From 0c76376db4927014575d4456f999750a0513d45e Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 15:26:16 +0300 Subject: [PATCH 02/20] Add gitignore --- .gitignore | 232 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 232 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e51bdc2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,232 @@ +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ + +### Python Patch ### +# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration +poetry.toml + +# ruff +.ruff_cache/ + +# LSP config files +pyrightconfig.json + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + From a12cc91dbf2b946ce71ddad725b77f431e0ee2d1 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 15:26:36 +0300 Subject: [PATCH 03/20] Add version of python --- python-version | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 python-version diff --git a/python-version b/python-version new file mode 100644 index 0000000..db81c67 --- /dev/null +++ b/python-version @@ -0,0 +1,2 @@ +Python 3.13.7 + From d9f06ca56ee9bb519dc82b323f9e9c4e181c15e7 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 15:37:47 +0300 Subject: [PATCH 04/20] Correct fast pow algorithm Bugs: - Was multiplying result by itself instead of base - Didn't handle odd pow correctly - Incorrectly processed pow of 1 --- src/fast_pow.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/fast_pow.py b/src/fast_pow.py index 1ba1dc1..fe79e4e 100644 --- a/src/fast_pow.py +++ b/src/fast_pow.py @@ -1,6 +1,12 @@ def fastPow(number, power): - result = number - while power != 1: - result *= result - power = power // 2 + result = 1 + base = number + + while power > 0: + if (power % 2 == 1): + result *= base + base *= base + power //= 2 + return result + From 202f9e43b5662b853e9ca83cbd3300dbf23b688e Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 15:43:54 +0300 Subject: [PATCH 05/20] Add input validation - Check if power is integer - Check if power isn't below zero --- src/fast_pow.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/fast_pow.py b/src/fast_pow.py index fe79e4e..acfb884 100644 --- a/src/fast_pow.py +++ b/src/fast_pow.py @@ -1,4 +1,13 @@ def fastPow(number, power): + if (not isinstance(power, int)): + printf("Error: not an integer!") + return None + + if power < 0: + printf("Error: negative value!") + return None + + result = 1 base = number From c4e3b010af018236e9f3e8eb8033d5c1e69239ab Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 15:47:21 +0300 Subject: [PATCH 06/20] Add edge cases handling - Return 1 if pow is 0 - Return number if pow is 1 --- src/fast_pow.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fast_pow.py b/src/fast_pow.py index acfb884..cd84c97 100644 --- a/src/fast_pow.py +++ b/src/fast_pow.py @@ -2,11 +2,14 @@ def fastPow(number, power): if (not isinstance(power, int)): printf("Error: not an integer!") return None - if power < 0: printf("Error: negative value!") return None + if power == 0: + return 1 + if power == 1: + return number result = 1 base = number From e96cd05bdd319b72e402d1aed673603f28eb4a39 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 15:49:00 +0300 Subject: [PATCH 07/20] Added number checking in input validation --- src/fast_pow.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fast_pow.py b/src/fast_pow.py index cd84c97..21191dc 100644 --- a/src/fast_pow.py +++ b/src/fast_pow.py @@ -1,6 +1,9 @@ def fastPow(number, power): + if (not isinstance(number, int)): + printf("Error: number is not an integer!") + return None if (not isinstance(power, int)): - printf("Error: not an integer!") + printf("Error: power is not an integer!") return None if power < 0: printf("Error: negative value!") From fa5c6876cf44fb0dac73345f3d4fbc6c120db125 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 15:51:42 +0300 Subject: [PATCH 08/20] Format function name --- src/fast_pow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fast_pow.py b/src/fast_pow.py index 21191dc..be9de9f 100644 --- a/src/fast_pow.py +++ b/src/fast_pow.py @@ -1,4 +1,4 @@ -def fastPow(number, power): +def fast_pow(number, power): if (not isinstance(number, int)): printf("Error: number is not an integer!") return None From 142d714b1dc3676c5cc375acc824e6369edf5edd Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 15:52:29 +0300 Subject: [PATCH 09/20] Format function and variables names --- src/luhn.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/luhn.py b/src/luhn.py index 11d993c..5c35d40 100644 --- a/src/luhn.py +++ b/src/luhn.py @@ -1,7 +1,7 @@ -def luhnСheck(cardNumber): - digits = [int(d) for d in str(cardNumber) if d.isdigit()] +def luhn_check(card_number): + digits = [int(d) for d in str(card_number) if d.isdigit()] control = digits.pop() - parity = (len(digits))%2 + parity = (len(digits)) % 2 total = 0 for i in range(len(digits)): if i % 2 == parity: @@ -12,3 +12,4 @@ def luhnСheck(cardNumber): else: total += digits[i] return (total + control) % 10 == 0 + From 8379cf47e6d16d66daf5f240a4a882a7c517ad6e Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 16:02:46 +0300 Subject: [PATCH 10/20] Fix luhn algorithm Bugs: - Wrong parity calculation - Wrong doubled calculation - Wrong else case --- src/luhn.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/luhn.py b/src/luhn.py index 5c35d40..1e87e90 100644 --- a/src/luhn.py +++ b/src/luhn.py @@ -1,15 +1,17 @@ def luhn_check(card_number): digits = [int(d) for d in str(card_number) if d.isdigit()] control = digits.pop() - parity = (len(digits)) % 2 + + parity = (len(digits) + 1) % 2 total = 0 for i in range(len(digits)): + doubled = digits[i] + if i % 2 == parity: - doubled = digits[i] * 2 + doubled = doubled * 2 if doubled > 9: - doubled -= 9 - total += doubled - else: - total += digits[i] + doubled = doubled - 9 + total += doubled + return (total + control) % 10 == 0 From e70df769775754b9f9ffb15c3babe61af85b8652 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 16:07:59 +0300 Subject: [PATCH 11/20] Add whitespace handling --- src/luhn.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/luhn.py b/src/luhn.py index 1e87e90..003dfe0 100644 --- a/src/luhn.py +++ b/src/luhn.py @@ -1,5 +1,6 @@ def luhn_check(card_number): - digits = [int(d) for d in str(card_number) if d.isdigit()] + card_number_str = str(card_number).replace(" ", "") + digits = [int(d) for d in card_number_str if d.isdigit()] control = digits.pop() parity = (len(digits) + 1) % 2 From 1c8be3491ffa7d0cf8533632c962bf77b21f4656 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 16:16:45 +0300 Subject: [PATCH 12/20] Add input handling - Card number should only consist of digits - Length of card number must be >= 16 --- src/luhn.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/luhn.py b/src/luhn.py index 003dfe0..4beb630 100644 --- a/src/luhn.py +++ b/src/luhn.py @@ -1,6 +1,15 @@ def luhn_check(card_number): card_number_str = str(card_number).replace(" ", "") - digits = [int(d) for d in card_number_str if d.isdigit()] + + if (not card_number_str.isdigit()): + print("Error: must contain only digits!") + return None + + if(len(card_number_str) < 16): + print("Error: must contain at least 16 digits!") + return None + + digits = [int(d) for d in card_number_str] control = digits.pop() parity = (len(digits) + 1) % 2 From 5b8cb31f2589cd3ef6d798776f4c3f6f040bbfb2 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 16:20:59 +0300 Subject: [PATCH 13/20] Format code --- src/fast_pow.py | 16 ++++++++-------- src/luhn.py | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/fast_pow.py b/src/fast_pow.py index be9de9f..9dbb69b 100644 --- a/src/fast_pow.py +++ b/src/fast_pow.py @@ -1,27 +1,27 @@ def fast_pow(number, power): - if (not isinstance(number, int)): - printf("Error: number is not an integer!") + if not isinstance(number, int): + print("Error: number is not an integer!") return None - if (not isinstance(power, int)): - printf("Error: power is not an integer!") + if not isinstance(power, int): + print("Error: power is not an integer!") return None if power < 0: - printf("Error: negative value!") + print("Error: negative value!") return None if power == 0: return 1 if power == 1: return number - + result = 1 base = number while power > 0: - if (power % 2 == 1): + if power % 2 == 1: result *= base base *= base power //= 2 return result - + diff --git a/src/luhn.py b/src/luhn.py index 4beb630..4688bf4 100644 --- a/src/luhn.py +++ b/src/luhn.py @@ -1,11 +1,11 @@ def luhn_check(card_number): card_number_str = str(card_number).replace(" ", "") - - if (not card_number_str.isdigit()): + + if not card_number_str.isdigit(): print("Error: must contain only digits!") return None - if(len(card_number_str) < 16): + if len(card_number_str) < 16: print("Error: must contain at least 16 digits!") return None @@ -22,6 +22,6 @@ def luhn_check(card_number): if doubled > 9: doubled = doubled - 9 total += doubled - + return (total + control) % 10 == 0 From fb89e754ceaf14860382ebd0017f95fbecbc9587 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 16:31:24 +0300 Subject: [PATCH 14/20] Fix number input handling --- src/fast_pow.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fast_pow.py b/src/fast_pow.py index 9dbb69b..994d456 100644 --- a/src/fast_pow.py +++ b/src/fast_pow.py @@ -1,7 +1,8 @@ def fast_pow(number, power): if not isinstance(number, int): - print("Error: number is not an integer!") - return None + if not isinstance(number, float): + print("Error: number is not an integer!") + return None if not isinstance(power, int): print("Error: power is not an integer!") return None From 5365273c55333c5e288cc5723a65063ca335c9f6 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 16:36:01 +0300 Subject: [PATCH 15/20] Fix number = 0 input handling --- src/fast_pow.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/fast_pow.py b/src/fast_pow.py index 994d456..af6fd1d 100644 --- a/src/fast_pow.py +++ b/src/fast_pow.py @@ -1,8 +1,7 @@ def fast_pow(number, power): - if not isinstance(number, int): - if not isinstance(number, float): - print("Error: number is not an integer!") - return None + if (not isinstance(number, int)) and (not isinstance(number, float)): + print("Error: number is not an integer!") + return None if not isinstance(power, int): print("Error: power is not an integer!") return None @@ -15,6 +14,12 @@ def fast_pow(number, power): if power == 1: return number + if number == 0: + if power > 0: + return 0 + print("undefined") + return 0 + result = 1 base = number From 450bbdbe3f3ed54b03d5d5b33019f172c95ab05c Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 16:38:02 +0300 Subject: [PATCH 16/20] Fix return in number = 0 hanling --- src/fast_pow.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/fast_pow.py b/src/fast_pow.py index af6fd1d..332398c 100644 --- a/src/fast_pow.py +++ b/src/fast_pow.py @@ -14,11 +14,9 @@ def fast_pow(number, power): if power == 1: return number - if number == 0: - if power > 0: - return 0 - print("undefined") - return 0 + if number == 0 and power == 0: + print("Error: 0 to the power of 0 is undefined!") + return None result = 1 base = number From 135062cebce53e72558bb921e456f87e470dc3fa Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 16:39:27 +0300 Subject: [PATCH 17/20] Fix input handling order --- src/fast_pow.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fast_pow.py b/src/fast_pow.py index 332398c..22549fc 100644 --- a/src/fast_pow.py +++ b/src/fast_pow.py @@ -9,15 +9,15 @@ def fast_pow(number, power): print("Error: negative value!") return None + if number == 0 and power == 0: + print("Error: 0 to the power of 0 is undefined!") + return None + if power == 0: return 1 if power == 1: return number - if number == 0 and power == 0: - print("Error: 0 to the power of 0 is undefined!") - return None - result = 1 base = number From f4d1ce7e94e49651ed97339277f57d96672490c7 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 16:40:27 +0300 Subject: [PATCH 18/20] Add tests --- test/test_fast_pow.py | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/test/test_fast_pow.py b/test/test_fast_pow.py index 5e4aebd..36dcff1 100644 --- a/test/test_fast_pow.py +++ b/test/test_fast_pow.py @@ -1,9 +1,41 @@ -from src.fast_pow import fastPow +from src.fast_pow import fast_pow def test_two_power_two(): - assert fastPow(2, 2) == 4 + assert fast_pow(2, 2) == 4 -def test_negative(): - assert fastPow(-1, 4) == 1 +def test_negative_base(): + assert fast_pow(-1, 4) == 1 + +def test_negative_power_returns_none(): + assert fast_pow(2, -1) is None + + +def test_zero_power_returns_one(): + assert fast_pow(5, 0) == 1 + assert fast_pow(100, 0) == 1 + assert fast_pow(-3, 0) == 1 + + +def test_power_of_one_returns_same_number(): + assert fast_pow(5, 1) == 5 + assert fast_pow(-3, 1) == -3 + + +def test_zero_base_cases(): + assert fast_pow(0, 1) == 0 + assert fast_pow(0, 5) == 0 + + +def test_float_base(): + assert fast_pow(2.5, 2) == 6.25 + + +def test_non_integer_power_returns_none(): + assert fast_pow(2, 2.5) is None + + +def test_zero_to_zero_returns_none(): + assert fast_pow(0, 0) is None + From 3eea45f7ab82c00f86159141e4c656361791b5f6 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 16:42:55 +0300 Subject: [PATCH 19/20] Add tests for luhn algorithm --- test/test_luhn.py | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/test/test_luhn.py b/test/test_luhn.py index 1c021a2..f371359 100644 --- a/test/test_luhn.py +++ b/test/test_luhn.py @@ -1,9 +1,26 @@ -from src.luhn import luhnСheck +from src.luhn import luhn_check -def test_good(): - assert luhnСheck("8571 2612 1234 5467") +def test_luhn_valid_card(): + assert luhn_check(4532015112830366) == True + assert luhn_check(6011514433546201) == True + assert luhn_check("4532 0151 1283 0366") == True -def test_bad(): - assert not luhnСheck("4561 2612 1234 5463") \ No newline at end of file +def test_luhn_invalid_card(): + assert luhn_check(4532015112830367) == False + assert luhn_check(1234567812345678) == False + + +def test_luhn_short_number(): + assert luhn_check(123456789345) == None + + +def test_luhn_non_digits(): + assert luhn_check("4532-0151-1283-0366") == None + assert luhn_check("4532abcd12830366") == None + + +def test_luhn_empty_string(): + assert luhn_check("") == None + From 22bbdd48ff375a1acc25527328ce720568d5314f Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 16:55:24 +0300 Subject: [PATCH 20/20] Add console input --- src/luhn.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/luhn.py b/src/luhn.py index 4688bf4..3b33b00 100644 --- a/src/luhn.py +++ b/src/luhn.py @@ -25,3 +25,30 @@ def luhn_check(card_number): return (total + control) % 10 == 0 + +def main(): + print("Enter card number to check validity") + print("Enter '-1' to exit") + + while True: + user_input = input("\nEnter card number: ").strip() + + if user_input == "-1": + break + + if not user_input: + print("Empty input!") + continue + + result = luhn_check(user_input) + + if result is None: + continue + elif result: + print("correct") + else: + print("incorrect") + +if __name__ == "__main__": + main() + \ No newline at end of file