This commit is contained in:
test 2023-03-29 11:17:58 +02:00
parent 7a7f411a71
commit 40e1c67559

11
main.py Normal file
View File

@ -0,0 +1,11 @@
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)