Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Python-Home-Challenges/NoamChallenge.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

def most_frequent(List):
dict = {}
count, itm = 0, ''
for item in reversed(List):
dict[item] = dict.get(item, 0) + 1
if dict[item] >= count :
count, itm = dict[item], item
return(itm)

file = open('sample.txt','r')
data = file.read().replace('\n', '')
words = data.split()

print(f"The most occuring word is: {most_frequent(words)}")
1 change: 1 addition & 0 deletions Python-Home-Challenges/sample.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I would love to try or hear the sample audio your app can produce. I do not want to purchase, because I've purchased so many apps that say they do something and do not deliver. Can you please add audio samples with text you've converted? I'd love to see the end results.Thanks!sfsdfasf