From 96574d43525642538a5a9f6cd7b472e0973116a8 Mon Sep 17 00:00:00 2001 From: HOME-VM-TOSCHOOL Date: Wed, 1 Nov 2023 22:35:56 +0100 Subject: [PATCH] B05 engine - difference show --- TaskB05/run.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/TaskB05/run.py b/TaskB05/run.py index 9023e3e..fd0697e 100644 --- a/TaskB05/run.py +++ b/TaskB05/run.py @@ -63,6 +63,7 @@ with open(join_path(sys.argv[3]), "r", newline="", encoding="utf8") as csvfile: test_out = list(filereader) +is_difference = [] for i, word in enumerate(test_in): current_state = 0 if len(word) != 0: @@ -74,8 +75,13 @@ for i, word in enumerate(test_in): print("YES\t", end="") if "YES" != test_out[i][0]: print("ERROR", word, end="") + is_difference.append(i) else: print("NO\t", end="") if "NO" != test_out[i][0]: print("ERROR", word, end="") + is_difference.append(i) print() + +if len(is_difference) != 0: + print(is_difference)