Open Shreeyak opened 7 years ago
Thanks for your comments. I will keep them in mind as I make changes to the course.
sry about the horrible formatting. Didn't notice it when I posted it. The coding was relatively challenging, having to figure out the structure of the program and what response the function is to return. If that was the aim, then you definitely succeeded. But my initial reaction when I saw the program was wtf? :)
The question to be solved in the utils.py needs to be more clear.
Please take a look at Google's python intro class's problem set: https://developers.google.com/edu/python/google-python-exercises.zip
Looks like this:
A. match_ends
Given a list of strings, return the count of the number of
strings where the string length is 2 or more and the first
and last chars of the string are the same.
Note: python does not have a ++ operator, but += works.
def match_ends(words):
+++your code here+++
count=0 for i in words: if len(i) >= 2: if i[:1] == i[-1:]: count += 1; return count