forked from tdwojak/Python2018
rozwiązania
This commit is contained in:
parent
36af9a48a9
commit
d5816599fd
@ -7,7 +7,8 @@ która zawiera tylko elementy z list o parzystych indeksach.
|
||||
"""
|
||||
|
||||
def even_elements(lista):
|
||||
pass
|
||||
|
||||
return lista[::2]
|
||||
|
||||
|
||||
def tests(f):
|
||||
|
@ -6,7 +6,12 @@
|
||||
"""
|
||||
|
||||
def days_in_year(days):
|
||||
pass
|
||||
if ((days%4) == 0 and (days%100!= 0)) or ((days%400) == 0):
|
||||
liczba_dni=366
|
||||
else:
|
||||
liczba_dni=365
|
||||
return liczba_dni
|
||||
|
||||
|
||||
def tests(f):
|
||||
inputs = [[2015], [2012], [1900], [2400], [1977]]
|
||||
|
@ -11,11 +11,15 @@ litery. (OOV = out of vocabulary) (W pythonie istnieje struktura danych tak
|
||||
jak 'set', która przechowuje elementy bez powtórzeń.)
|
||||
"""
|
||||
|
||||
|
||||
from sets import Set
|
||||
def oov(text, vocab):
|
||||
pass
|
||||
rozdzielenie=text.split(' ')
|
||||
slowa= set()
|
||||
slowa= (slowa for slowa in rozdzielenie if slowa not in vocab)
|
||||
|
||||
|
||||
return slowa
|
||||
|
||||
|
||||
def tests(f):
|
||||
inputs = [("this is a string , which i will use for string testing",
|
||||
|
Loading…
Reference in New Issue
Block a user