reorder python solution to own folder

This commit is contained in:
WieErWill 2023-12-01 18:58:29 +01:00
parent 6ff70d7c53
commit 988f6c3f99
4 changed files with 14 additions and 6 deletions

View File

@ -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}")

View File

@ -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}")

View File

@ -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