19 lines
359 B
Python
19 lines
359 B
Python
|
|
file = open('/Users/mastermito/Dev/AdventOfCode/Day0/input.txt', 'r')
|
||
|
|
|
||
|
|
#start of dial
|
||
|
|
number = 50
|
||
|
|
#counter for zeros
|
||
|
|
counter = 0
|
||
|
|
|
||
|
|
lines = file.readlines()
|
||
|
|
|
||
|
|
for line in lines:
|
||
|
|
step = int(line[1:])
|
||
|
|
direction = 1 if line.startswith('R') else -1;
|
||
|
|
|
||
|
|
number = (number + (direction * step)) % 100
|
||
|
|
|
||
|
|
print('counter:', counter)
|
||
|
|
|
||
|
|
file.close()
|