added day 1 code and updated organiser
This commit is contained in:
+12
-3
@@ -4,7 +4,7 @@ import os
|
||||
base_dir = 'advent_of_code_2023'
|
||||
|
||||
# Loop over the range 1 to 25 (inclusive)
|
||||
for i in range(1, 26):
|
||||
for i in range(2, 26):
|
||||
# Construct the folder name
|
||||
folder_name = f"day_{i}"
|
||||
|
||||
@@ -17,7 +17,8 @@ for i in range(1, 26):
|
||||
# Construct the full path to the placeholder file
|
||||
input_file_path = os.path.join(folder_path, "input.txt")
|
||||
puzzle_file_path = os.path.join(folder_path, "puzzle_text.md")
|
||||
solution_file_path = os.path.join(folder_path, "solution.py")
|
||||
solution_file_path_1 = os.path.join(folder_path, "part 1 solution.py")
|
||||
solution_file_path_2 = os.path.join(folder_path, "part 2 solution.py")
|
||||
|
||||
# Create the placeholder file
|
||||
with open(input_file_path, "w") as file:
|
||||
@@ -28,7 +29,15 @@ for i in range(1, 26):
|
||||
file.write( f"# Day {i} Puzzle Text.")
|
||||
|
||||
# Create the solution file
|
||||
with open(solution_file_path, "w") as file:
|
||||
with open(solution_file_path_1, "w") as file:
|
||||
file.write(f"""import os
|
||||
|
||||
with open('{input_file_path}', 'r') as file:
|
||||
input = file.read()
|
||||
|
||||
print(input)
|
||||
""")
|
||||
with open(solution_file_path_2, "w") as file:
|
||||
file.write(f"""import os
|
||||
|
||||
with open('{input_file_path}', 'r') as file:
|
||||
|
||||
Reference in New Issue
Block a user