Difference between revisions of "CSC111 Midterm Exam Preparation 2015"

From dftwiki3
Jump to: navigation, search
Line 137: Line 137:
 
</source>
 
</source>
 
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 length of "dog" plus the length of "horse".
 
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 length of "dog" plus the length of "horse".
 +
<br />
 +
=Question 13=
 +
<br />
 +
What is a bit?
 +
<br />
 +
=Question 14=
 +
<br />
 +
Write a loop that prints the first letter of all the words in a list of words.  The list is called <tt>farm</tt>.  Your program should work no matter how many names are in the list.  For example, if the list is equal to <tt>farm = [ "Horse", "Cat", "Dog", "Mouse"]</tt>, the program will print H, C, D, and M, on separate lines.
 +
<br />
 
</onlydft>
 
</onlydft>

Revision as of 20:47, 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.



...