1 Getting Ready For Final Exam
1.1 Skills
1.1.1 String Manipulation
1.1.2 Input Output
1.2 In-Class Exercise
1.3 Version : 2014/ 08/ 21

CS 1004 Aug 14 2014

Lecture Path: 24
Back Next

Class: Course Evaluations

Think of yourself as a brand. You need to be remembered. What will they remember you for? What defines you? If you have it in you, do something that defines you. Invent something, develop a unique skill, get noticed for something – it creates a talking point.

Chris Arnold

1 Getting Ready For Final Exam

1.1 Skills

We are continuing the process of reviewing the core skills that I used when designing this course.

1.1.1 String Manipulation
1.1.2 Input Output

1.2 In-Class Exercise

Here are a number of programming questions that you should all be able to do. I encourage you to try solving them all

You are given a list of lists (i.e., something like [ [1, 2, 3], [9, 4], [5, 4, 2, 3] ]) and you are asked to append all individual values to create a single large list [ 1, 2, 3, 9 4, 5, 4, 2, 3].

hint: You can solve this without a nested loop

You have a string representing the pages of a document that you would like to print (i.e., something like ’1,5,16,20-25,33’) where commas separate individual pages as well as regions represented by hyphens. You want to count the total number of integers in the representation. In the above case, there would be ten pages printed.

hint: split will really come in handy here, more than once

Given a list containing only 0s and 1s, determine whether there is a consecutive run of N 1s, where N is the parameter to the function.

1.3 Version : 2014/08/21

(c) 2014, George Heineman