diff --git a/Hwpython.py b/Hwpython.py new file mode 100644 index 0000000..2d951bb --- /dev/null +++ b/Hwpython.py @@ -0,0 +1,16 @@ +#my code: + +with open('text.txt', 'r') as file: + f_read=file.read().split() + word_counter={} + for word in List: + if word in wordDict: + word_counter[word]+=1 + else: + word_counter[word]=1 + + print(f' the most recurring word in that file: {max(wordDict, key=wordDict.get)}') + print(f'Appears {wordDict[max(wordDict,key=wordDict.get)]} times') + + + diff --git a/text.txt b/text.txt new file mode 100644 index 0000000..b520b34 --- /dev/null +++ b/text.txt @@ -0,0 +1,10 @@ +Hello world +my name is mor + +Hello world +its my first program i write in python + +i do now homework at python +i use at python version python 3.6 + +python