20 lines
477 B
Python
20 lines
477 B
Python
|
count = 0
|
||
|
grow = 0
|
||
|
|
||
|
with open('day1_data.txt') as f:
|
||
|
list_array = f.readlines()
|
||
|
|
||
|
for x in range(0,len(list_array),1):
|
||
|
|
||
|
if count != 0:
|
||
|
if int(list_array[count]) > int(list_array[count-1]):
|
||
|
grow += 1
|
||
|
print("Count: "+str(count)+"\t\t "+str(int(list_array[count]))+" ~ "+str(int(list_array[count-1]))+"\t\tGrow: "+str(grow))
|
||
|
|
||
|
count += 1
|
||
|
|
||
|
|
||
|
print("I count "+str(count)+" lines")
|
||
|
print("I found "+str(grow)+" depth measurement increases")
|
||
|
|