12 lines
481 B
Python
12 lines
481 B
Python
|
with open('dev-0/out.tsv', 'w', newline='\n') as fout:
|
||
|
with open('dev-0/in.tsv', encoding='utf-8') as fin:
|
||
|
for line in fin.readlines():
|
||
|
prob1 = len(line) % 5 + 1
|
||
|
prob1 = round(prob1/10, 1)
|
||
|
prob2 = round(0.9 - prob1, 1)
|
||
|
prob3 = round(1 - prob1 - prob2, 1)
|
||
|
word = 'on' if prob1 < 0.3 else 'in'
|
||
|
result = f'{word}:{prob1} a:{prob2} :{prob3}\n'
|
||
|
print(result)
|
||
|
fout.write(result)
|