mirror of
https://gitlab.com/arnekeller/kit-programmieren-ws1920-final2.git
synced 2024-11-08 09:50:38 +00:00
26 lines
606 B
Python
26 lines
606 B
Python
|
import sys
|
||
|
|
||
|
fuzz = sys.argv[1]
|
||
|
|
||
|
input = open(fuzz + "_input.txt", "r")
|
||
|
output = open(fuzz + "_output.txt", "r")
|
||
|
|
||
|
in_lines = input.readlines()
|
||
|
out_lines = output.readlines()
|
||
|
for i in range(0, len(in_lines)):
|
||
|
if not in_lines[i].startswith("#"):
|
||
|
print(">", in_lines[i], end="")
|
||
|
else:
|
||
|
print(in_lines[i], end="")
|
||
|
if out_lines[i].startswith("Error, "):
|
||
|
print("<e")
|
||
|
else:
|
||
|
print(out_lines[i], end="")
|
||
|
|
||
|
for i in range(len(in_lines), len(out_lines)):
|
||
|
line = out_lines[i]
|
||
|
if line.startswith("Error, "):
|
||
|
print("<e")
|
||
|
else:
|
||
|
print(line, end="")
|