diff --git a/Day01/part1.py b/Day01/python/part1.py similarity index 97% rename from Day01/part1.py rename to Day01/python/part1.py index 9eeedb6..a787991 100644 --- a/Day01/part1.py +++ b/Day01/python/part1.py @@ -45,6 +45,6 @@ def sum_calibration_values(filename): # Main execution if __name__ == "__main__": - filename = "input.txt" + filename = "../input.txt" total_calibration_value = sum_calibration_values(filename) print(f"Total Sum of Calibration Values: {total_calibration_value}") diff --git a/Day01/part2.py b/Day01/python/part2.py similarity index 96% rename from Day01/part2.py rename to Day01/python/part2.py index f2043d5..2c810be 100644 --- a/Day01/part2.py +++ b/Day01/python/part2.py @@ -47,6 +47,6 @@ def sum_calibration_values(file_path): # Main execution if __name__ == "__main__": import sys - filename = sys.argv[1] if len(sys.argv) > 1 else "input.txt" + filename = sys.argv[1] if len(sys.argv) > 1 else "../input.txt" total_calibration_value = sum_calibration_values(filename) print(f"Total Sum of Calibration Values: {total_calibration_value}") diff --git a/Day01/test.txt b/Day01/python/test.txt similarity index 100% rename from Day01/test.txt rename to Day01/python/test.txt diff --git a/README.md b/README.md index 02c5e2e..cfa5a43 100644 --- a/README.md +++ b/README.md @@ -44,19 +44,27 @@ To run any of the solutions, navigate to the respective day's directory and run For example: ```bash -cd Day01 -python part2.py +cd Day01/python +python3 part2.py test.txt # for testing +python3 part2.py ``` For Rust you have to use the rust project generated in each Day. Make sure you have Rust and Cargo installed. You can either test or run the solution: -``` + +```bash cd Day01/rust -cargo test +cargo test #running tests cargo run ``` +Using solutions in JavaScript requires NodeJS installed on your system. Then: +```bash +cd Day01/js +node solution.js +``` + Make sure you have Python installed on your machine. The solutions are developed using Python 3.x. ## Feedback and Collaboration