Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coding challenge 0.1 #8

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Yarinh55
Copy link

Adding my solution for challenge

@@ -0,0 +1,21 @@

def most_common_word(file_name):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for using functions
but, best practice, is to create few functions, with each one of them doing 1 thing only



if __name__== "__main__":
file_name = input("insert file path: ")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is a bit risky to ask user to enter file name, if your decision is to do so, you man want to use some validation for his input

file_name = input("insert file path: ")
most_common_word(file_name)


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please make sure you code pass Flask8 lint validation

@Yarinh55
Copy link
Author

Yarinh55 commented Dec 7, 2019

Hi @AviadP
I split the code to functions and aligned it according to flake8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants