Difference between revisions of "CSC111 Midterm Exam Preparation 2015"

From dftwiki3
Jump to: navigation, search
Line 126: Line 126:
 
<br />
 
<br />
 
::<source lang="python">
 
::<source lang="python">
numbers = [ 1, 10, -3, 20, ... 5 ]
+
numbers = [ 1, 10, -3, 20, ..., 5 ]
 
</source>
 
</source>
 
<br />
 
<br />
Line 136: Line 136:
 
farm = [ "dog", "cat", "horse", ... , "mouse" ]
 
farm = [ "dog", "cat", "horse", ... , "mouse" ]
 
</source>
 
</source>
Write the code that will
+
Write the code that will print the sum of the length of all the words.  For example, if the list contains [ "dog", "horse" ], the program would print 8, which is 3 + 5, the lengths of "dog" plus "horse".
 
</onlydft>
 
</onlydft>

Revision as of 20:37, 28 February 2015

--D. Thiebaut (talk) 18:08, 28 February 2015 (EST)


Midterm Exam Prep

The midterm is an in-class exam given under the rules of the honor code. It lasts 70 minutes. It will be closed books, closed notes, closed computers.



...