Skip to content

Commit 07770fe

Browse files
Refactor 2021 to 2021-python
1 parent 48b691e commit 07770fe

18 files changed

+7
-7
lines changed

Diff for: 2021/day01/day01.py renamed to 2021-python/day01/day01.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def find_number_of_times_measurement_increases(measurements):
1515
number_of_times_measurement_increases += 1
1616
return number_of_times_measurement_increases
1717

18-
measurements = read_measurements('./2021/day01/input.txt')
18+
measurements = read_measurements('./2021-python/day01/input.txt')
1919
print("Number of times the measurement increases: " + str(find_number_of_times_measurement_increases(measurements)))
2020

2121
# -------- Part 2 ----------
File renamed without changes.

Diff for: 2021/day02/day02.py renamed to 2021-python/day02/day02.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def calculate_horizontal_and_depth(measurements):
2121

2222
return horizontal_count * depth_count
2323

24-
measurements = read_measurements('./2021/day02/input.txt')
24+
measurements = read_measurements('./2021-python/day02/input.txt')
2525
print("Ergebnis von Tag 2.1:", calculate_horizontal_and_depth(measurements))
2626

2727
# Part 2
File renamed without changes.

Diff for: 2021/day03/day03.py renamed to 2021-python/day03/day03.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def calculate_power_consumption(input):
3535
# mulitply the two binary numbers to get the integer power consumption
3636
return (int(gamma, 2) * int(epsilon, 2))
3737

38-
report = read_diagnostic_report('./2021/day03/input.txt')
38+
report = read_diagnostic_report('./2021-python/day03/input.txt')
3939
power_consumption = calculate_power_consumption(report)
4040
print("The power consumption is: ", power_consumption)
4141

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: 2021/day04/main.py renamed to 2021-python/day04/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,6 @@ def part_two(path: str) -> int:
128128
return 0
129129

130130
if __name__ == "__main__":
131-
input_path = "./2021/day04/input.txt"
131+
input_path = "./2021-python/day04/input.txt"
132132
print("The result of Part 1:", part_one(input_path))
133133
print("The result of Part 2:", part_two(input_path))
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: 2021/day05/main.py renamed to 2021-python/day05/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,6 @@ def part_two(input_path: str) -> int:
191191
return result
192192

193193
if __name__ == "__main__":
194-
input_path = "./2021/day05/input.txt"
194+
input_path = "./2021-python/day05/input.txt"
195195
print("The result of Part 1:", part_one(input_path))
196196
print("The result of Part 2:", part_two(input_path))
File renamed without changes.
File renamed without changes.

Diff for: 2021/day06/main.py renamed to 2021-python/day06/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ def part_two(input_path: str) -> int:
3434
return len(numbers)
3535

3636
if __name__ == "__main__":
37-
input_path = "./2021/day06/input.txt"
37+
input_path = "./2021-python/day06/input.txt"
3838
print("The result of Part 1:", part_one(input_path))
3939
print("The result of Part 2:", part_two(input_path))

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The solutions are written in Python, Swift and/or Go.
55

66
| <img alt="Python" width="120" height="120" src="https://cdn.worldvectorlogo.com/logos/python-5.svg"/> | <img alt="Swift" width="120" height="120" src="https://cdn.worldvectorlogo.com/logos/swift-15.svg"/> | <img alt="Go" width="120" height="120" src="https://cdn.worldvectorlogo.com/logos/golang-1.svg"/> |
77
| -------------- | ------------------------------------ |---------------------------------------------------------------------------------------------------|
8-
| [2021](/2021/) | [2021.playground](/2021.playground/Pages/) | |
8+
| [2021-python](/2021-python/) | [2021.playground](/2021.playground/Pages/) | |
99
| | | [2022-go](/2022-go/) |
1010

1111
[aoc]: https://adventofcode.com

0 commit comments

Comments
 (0)