diff --git a/__pycache__/__init__.cpython-36.pyc b/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..df8d443 Binary files /dev/null and b/__pycache__/__init__.cpython-36.pyc differ diff --git a/q01_longest_even_word/__pycache__/__init__.cpython-36.pyc b/q01_longest_even_word/__pycache__/__init__.cpython-36.pyc index 8ad4b68..5f20583 100644 Binary files a/q01_longest_even_word/__pycache__/__init__.cpython-36.pyc and b/q01_longest_even_word/__pycache__/__init__.cpython-36.pyc differ diff --git a/q01_longest_even_word/__pycache__/build.cpython-36.pyc b/q01_longest_even_word/__pycache__/build.cpython-36.pyc index 7926364..9742cc2 100644 Binary files a/q01_longest_even_word/__pycache__/build.cpython-36.pyc and b/q01_longest_even_word/__pycache__/build.cpython-36.pyc differ diff --git a/q01_longest_even_word/build.py b/q01_longest_even_word/build.py index 0685739..1527c96 100644 --- a/q01_longest_even_word/build.py +++ b/q01_longest_even_word/build.py @@ -1,9 +1,26 @@ +# %load q01_longest_even_word/build.py # Default imports import re +input1 = 'time to write a great code' # Write your solution here : def q01_longest_even_word(sentence): + maxlen = 0 + input2 = sentence.split(' ') + for i in input2: + if (len(i)%2 == 0 and len(i) > maxlen): + maxlen = len(i) + finalop = i - + if maxlen == 0: + return (0) + else: + return (finalop) +data1 = 'One great way to make predictions about an unfamiliar nonfiction text is to take a walk through the book before reading.' +data2 = 'photographs or other images, readers can start to get a sense about the topic. This scanning and skimming helps set the expectation for the reading.' +data3 = ' testing very9 important' +q01_longest_even_word(data3) + + diff --git a/q01_longest_even_word/tests/__pycache__/__init__.cpython-36.pyc b/q01_longest_even_word/tests/__pycache__/__init__.cpython-36.pyc index 7782007..ba3ef46 100644 Binary files a/q01_longest_even_word/tests/__pycache__/__init__.cpython-36.pyc and b/q01_longest_even_word/tests/__pycache__/__init__.cpython-36.pyc differ diff --git a/q01_longest_even_word/tests/__pycache__/test.cpython-36.pyc b/q01_longest_even_word/tests/__pycache__/test.cpython-36.pyc index a62a5d8..eb8f239 100644 Binary files a/q01_longest_even_word/tests/__pycache__/test.cpython-36.pyc and b/q01_longest_even_word/tests/__pycache__/test.cpython-36.pyc differ