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 # Main execution
if __name__ == "__main__": if __name__ == "__main__":
filename = "input.txt" filename = "../input.txt"
total_calibration_value = sum_calibration_values(filename) total_calibration_value = sum_calibration_values(filename)
print(f"Total Sum of Calibration Values: {total_calibration_value}") print(f"Total Sum of Calibration Values: {total_calibration_value}")

View File

@ -47,6 +47,6 @@ def sum_calibration_values(file_path):
# Main execution # Main execution
if __name__ == "__main__": if __name__ == "__main__":
import sys 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) total_calibration_value = sum_calibration_values(filename)
print(f"Total Sum of Calibration Values: {total_calibration_value}") 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: For example:
```bash ```bash
cd Day01 cd Day01/python
python part2.py python3 part2.py test.txt # for testing
python3 part2.py
``` ```
For Rust you have to use the rust project generated in each Day. For Rust you have to use the rust project generated in each Day.
Make sure you have Rust and Cargo installed. Make sure you have Rust and Cargo installed.
You can either test or run the solution: You can either test or run the solution:
```
```bash
cd Day01/rust cd Day01/rust
cargo test cargo test #running tests
cargo run 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. Make sure you have Python installed on your machine. The solutions are developed using Python 3.x.
## Feedback and Collaboration ## Feedback and Collaboration