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

Assignment Week #1 - Sara #4

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

Conversation

cheeyim
Copy link

@cheeyim cheeyim commented Nov 13, 2017

This PR will be reviewed by @MeiTzy222

Copy link

@MeiTzy222 MeiTzy222 left a comment

Choose a reason for hiding this comment

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

Assignment #1
Well done, Sara! I think your codes for assignment 1 are clean and organized.
I wonder if it works too if we remove line #11... Give it a try?

Copy link

@MeiTzy222 MeiTzy222 left a comment

Choose a reason for hiding this comment

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

Assignment #2
Hi Sara! Well done on spotting the tests pattern - every time 'b' appears, it appears with 'a' hence = 2 while 'a' always appear alone hence = 1. I didn't notice this pattern until I see your codes.
To make your codes even better, perhaps you could try to think of a solution that is more "universal"? Maybe a simple scoring system like 1 match = 1 score...? In order to get your function works on different scenarios on top of the 'a', 'b' and 'c' scenario in these tests.

Copy link

@MeiTzy222 MeiTzy222 left a comment

Choose a reason for hiding this comment

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

Assignment #3
Sara, I like how you break the test down into smaller parts with "new_word, solo, new_word".
To make your function works on other "a_string" too apart from the tests here, perhaps you could leverage on "word_to_replace" and "new_word".
Maybe something like if "word_to_replace" is found in "a_string", what do we do? If not found, what do we do instead?

Copy link

@MeiTzy222 MeiTzy222 left a comment

Choose a reason for hiding this comment

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

Assignment #4
I like how you use nested if. To improve your codes, perhaps you could explore Python library to see if it is possible to count the number of occurrences of "a_word" so that your function will work in cases other than 'Python' as "a_word" too.

Copy link

@MeiTzy222 MeiTzy222 left a comment

Choose a reason for hiding this comment

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

Assignment #5
Sara, try to search the library to see if there is any function we can use to call or find the index of a specific word defined for us, i.e. "first_word", "second_word" and "third_word" in this case.

Copy link

@MeiTzy222 MeiTzy222 left a comment

Choose a reason for hiding this comment

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

Assignment #6
Great use of formatter! And I admire your persistence. Well done, Sara!

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.

3 participants