1
0
forked from tdwojak/Python2017
This commit is contained in:
s45159 2017-12-16 00:56:43 +01:00
parent fdc76696c9
commit 4f878a9849
2 changed files with 24 additions and 0 deletions

7
labs03/task02.py Normal file
View File

@ -0,0 +1,7 @@
def f(n):
a,b = 1,1
for i in range(n-1):
a,b = b,a+b
return a
print(f(55))

17
labs03/task05.py Normal file
View File

@ -0,0 +1,17 @@
import glob
path = 'scores/model.iter*.npz.bleu'
for file in glob(path):
with open(file, 'r') as f:
for line in f.readlines():
num = float(line[line.find("=")+1:line.find(",")])
if num > 0:
max_num = num
max_num_file = file
file.close()
print(max_num_file)