-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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?
There was a problem hiding this 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.
There was a problem hiding this 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?
There was a problem hiding this 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.
There was a problem hiding this 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.
There was a problem hiding this 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!
This PR will be reviewed by @MeiTzy222