Wednesday, February 23, 2011

lecture

HW 2
2.1: Open a ASCII text file, count the frequency of each symbol. Store those frequencies in an array freq. Print out that array.

a cab am i.

a, b = b, a

def foo():
return 1, 3

def main():
x, y = foo()

5 comments:

  1. Professor,

    would you like us to print out the entire array? Or just those elements that have something in them? Also, I went to submit it on Blackboard and it doesn't seem to be up yet...

    ReplyDelete
  2. good point!
    either or, but it makes sense to have just the elements that have something in them.

    i'll try to put the link to submit on Blackboard up soon.

    ReplyDelete
  3. Professor,

    I just noticed that the link to submit on blackboard still isn't up..was it due tonight by midnight? Oh, and is HW #2.2 due Wednesday night? Thanks.

    ReplyDelete
  4. FYI, you can get the ascii value of a char by casting it as an int.

    ReplyDelete
  5. thanks.
    i just put up both links. let's say that both 2.1 and 2.2 are due Wednesday night.

    ReplyDelete