Wednesday, September 17, 2014

Introduction (Week1+2)

We've finished the first week of lectures, and we're approaching the end of the second week. So far I'm finding the content quite easy to understand. Mostly, we've been looking at various statements and determining whether they are true or false, studying the way quantifiers work, and using Venn diagrams to help us solve problems. I have learned the importance of being precise, and that you have to be really careful with natural language, as it can be quite ambiguous. 

When going over the lecture slides, I was confused for a while with the word 'any' in the following function:

def q1(S1, S2):
    ''' (set, set)  -> bool
    Return whether ...
    '''
    return any ({x in S2 for x in S1})

'Any' could mean that within a given set, any element will return true for a certain statement (basically meaning all of them will return true), or it could mean whether there are any elements in the given set that will return true for the statement (if there exists one or more elements that will return true for the statement). In the end, I tested the function out in Python shell and learned that it had the latter meaning. 

Overall, I'm finding CSC165 to be quite enjoyable. Content is a little too simple at the moment, but I'm sure it gets more challenging later on. 

No comments:

Post a Comment