diff --git a/count_word.py b/count_word.py index e69de29..f067016 100644 --- a/count_word.py +++ b/count_word.py @@ -0,0 +1,4 @@ +def countWord(file_path, keyword): + f = open(file_path) + contents = f.read() + return contents.count(keyword) diff --git a/count_word.pyc b/count_word.pyc new file mode 100644 index 0000000..f0098ec Binary files /dev/null and b/count_word.pyc differ diff --git a/tests/__init__.pyc b/tests/__init__.pyc new file mode 100644 index 0000000..5d05c44 Binary files /dev/null and b/tests/__init__.pyc differ diff --git a/tests/test_countWord.pyc b/tests/test_countWord.pyc new file mode 100644 index 0000000..46cb6bb Binary files /dev/null and b/tests/test_countWord.pyc differ