reorder python solution to own folder
This commit is contained in:
parent
6ff70d7c53
commit
988f6c3f99
@ -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}")
|
@ -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}")
|
16
README.md
16
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
|
||||
|
Loading…
Reference in New Issue
Block a user