CS 111 - 11/29/16 Final Exam is on Wednesday 12/7/16 at 3:30-5:30pm in LC-A1 NOTE ROOM CHANGE!!!!!! No Pictures or Turtles will be on the exam. Write an extra credit question in Blackboard Forum for 1% credit at end of semester. Do this by Monday 12/5/16. Course Evaluations are available. ============================================= Project 4 Converting a string into a list of numbers: word = "hello" length = len(word) for i in range (length): ch = word[i] asciiNum = ord (ch) print i, ch, asciiNum Convert a list of numbers into a string: numbers = [ 104, 101, 108, 108, 111 ] message = "" numbersLength = len (numbers) for i in range (numbersLength): val = numbers[i] ch2 = chr(val) message = message + ch2 print i, ch2, val, message print "Final message: " + message Finding the largest value in a list of numbers list = [ 23, 45, 43, 26, 87, 12, 45, 92, 13, 76 ] maxVal = 0 for i in range ( len (list) ) : if ( list[i] > maxVal ): maxVal = list[i] Sorting Algorithms One common sorting technique is to find the largest value in the list and exchange that value with the end value Repeat the abovew step with all of the values in the list except the largest value(s)