diff --git a/2021/4/data b/2021/4/data index ba441b7..25caf6c 100644 --- a/2021/4/data +++ b/2021/4/data @@ -599,3 +599,4 @@ 68 36 4 24 71 43 31 60 19 95 52 55 13 83 78 + diff --git a/2021/4/main.py b/2021/4/main.py index eb5937c..dcd7c6b 100644 --- a/2021/4/main.py +++ b/2021/4/main.py @@ -56,6 +56,9 @@ with open('data', 'r') as fp: else: # add the next array of numbers to the temporary board object temp_board.append(line.strip().split()) + if(len(temp_board)): + print('ERROR: You must have an empty line at the end of your data.') + exit() winning_number,winning_board_index = FindWinner(numbers) print('Winning Number:', winning_number, ', Winning Board Index: ', winning_board_index)