Difference between revisions of "CSC111 Midterm Exam Preparation 2015"

From dftwiki3
Jump to: navigation, search
Line 56: Line 56:
 
=Question 6=
 
=Question 6=
 
<br />
 
<br />
Write a loop that prints all the numbers between -100 and 100, included, that are multiples of 5.  The numbers should be output one per line.  The first line will contain -100, the next line, -95, then -90, and at the end, 95, and 100, on the last line.
+
Write a '''for-loop''' that prints all the numbers multiple of 5, ranging from -100 and 100, included.  The numbers should be output one per line.  The first line will contain -100, the next line, -95, then -90, down to, 95, and 100, on the last line.
 
<br />
 
<br />
 
=Question 7=
 
=Question 7=

Revision as of 06:54, 1 March 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. The questions below will give you a taste for the type of questions you will find in the exam. Work on each question on paper, possibly interacting with people around you if you get stuck. You can find the answers different ways: a) by going to the special lab session dedicated to the midterm preparation, b) by reading the text book, c) by using Idle and writing up a solution, and/or d) by reviewing the lectures notes for each week.



...