From 148c928f4b15a447ae59e6c26e0fd6c2c6a3bde0 Mon Sep 17 00:00:00 2001 From: m9henri Date: Wed, 25 Sep 2024 13:22:46 +0200 Subject: [PATCH] fixed the bug --- .vscode/launch.json | 2 +- main.py | 16 ---------------- MainTracker.py => start+tracker.py | 18 +++++++++++++++++- 3 files changed, 18 insertions(+), 18 deletions(-) delete mode 100644 main.py rename MainTracker.py => start+tracker.py (69%) diff --git a/.vscode/launch.json b/.vscode/launch.json index e0087c8..4a0ec9c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -8,7 +8,7 @@ "name": "Python Debugger: Current File", "type": "debugpy", "request": "launch", - "program": "main.py", + "program": "start+tracker.py", "console": "externalTerminal" } ] diff --git a/main.py b/main.py deleted file mode 100644 index d9840dc..0000000 --- a/main.py +++ /dev/null @@ -1,16 +0,0 @@ -from MainTracker import transaction -import os - -def start(): - - print( - """Welcome to the money tracker! - Select one of these three options: - - - Add a new entry (A) - - Close the program (E)\n""") - entry_Q = input("Choose your operation: ") - if entry_Q == "A": - transaction() - if entry_Q == "E": - os.abort() \ No newline at end of file diff --git a/MainTracker.py b/start+tracker.py similarity index 69% rename from MainTracker.py rename to start+tracker.py index 34534c4..8925e1a 100644 --- a/MainTracker.py +++ b/start+tracker.py @@ -23,4 +23,20 @@ def transaction(): print("\nOk we'll reset it for you in 5 seconds.") time.sleep(5) transaction() - return \ No newline at end of file + return + +def start(): + os.system("cls") + print( + """Welcome to the money tracker! + Select one of these three options: + + - Add a new entry (A) + - Close the program (E)\n""") + entry_Q = input("Choose your operation: ") + if entry_Q == "A": + transaction() + if entry_Q == "E": + os.abort() + +start() \ No newline at end of file