Re: Final

33 views
Skip to first unread message

S.F. Kyale

unread,
May 4, 2013, 2:15:00 PM5/4/13
to Junaid Mahmood, uic-mcs...@googlegroups.com
I'm guessing that most problems match some practice test problem nearly word for word.

The binary to other base problem will almost definitely be on the test.

There will probably be a variant of problem 9 that uses the exception handling he talked about on Friday. 

try:
   some code
except Exception as x:
   print 'some code was so horrid\nit gave me some {}.'.format(x)
finally:
   print 'is done'


He may want us to code for specific exception types such as IOError.

Exception is a catchall for any type of error. And except can stand alone.

try:
   0/1
except:
   print 'there was an error.'

That is the simplest form. It's worth remembering because it's very useful, at least in python or any language that has error handling. Because sometimes it may be more efficient to handle a predictable error than to prevent it in all cases.


On Sat, May 4, 2013 at 12:16 PM, Junaid Mahmood <jma...@uic.edu> wrote:
Since you generally seem to know your stuff, can you tell me what Professor Lowman said about the final? What should I be studying? Will going through the practice mid-term exam be enough? 

Afif Khaja

unread,
May 4, 2013, 2:58:46 PM5/4/13
to MCS 260 Google group
 Does anyone know the efficiency of betterbubble? (Big O notation for worst case, average case, best case)

--
You received this message because you are subscribed to the Google Groups "uic-mcs260-s13" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uic-mcs260-s1...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jeremy Kun

unread,
May 4, 2013, 3:03:20 PM5/4/13
to Afif Khaja, MCS 260 Google group
"Better" bubble is a misnomer. It's still average and worst-case n^2. Best case is n, but that will only happen if the array is almost perfectly sorted to begin with.

Jeremy Kun
Mathematics Graduate Student
University of Illinois at Chicago

Afif Khaja

unread,
May 4, 2013, 3:16:17 PM5/4/13
to MCS 260 Google group
Thanks
Reply all
Reply to author
Forward
0 new messages