Pārlūkot izejas kodu

Change input filename structure

master
Noëlle pirms 11 mēnešiem
vecāks
revīzija
32f7740148
Šim parakstam datu bāzē netika atrasta zināma atslēga
3 mainītis faili ar 18 papildinājumiem un 2 dzēšanām
  1. 16
    0
      .gitignore
  2. 1
    1
      day01-1.py
  3. 1
    1
      day01-2.py

+ 16
- 0
.gitignore Parādīt failu

@@ -114,3 +114,19 @@ dmypy.json
# Pyre type checker
.pyre/

# Virtual environment
pyvenv.cfg
bin/activate
bin/activate.csh
bin/activate.fish
bin/Activate.ps1
bin/pip
bin/pip3
bin/pip3.10
bin/python
bin/python3
bin/python3.10
lib64

# Advent of Code
*.input

+ 1
- 1
day01-1.py Parādīt failu

@@ -1,7 +1,7 @@
def main():
from string import digits

with open("input01.txt", "r") as file:
with open("day01.input", "r") as file:
input_lines = file.readlines()

# The calibration value of each line is the first and last digit

+ 1
- 1
day01-2.py Parādīt failu

@@ -10,7 +10,7 @@ def main():

DIGITS_SPELLED = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]

with open("input01.txt", "r") as file:
with open("day01.input", "r") as file:
input_lines = file.readlines()

# The calibration value of each line is the first and last digit

Notiek ielāde…
Atcelt
Saglabāt