When you have finished reading, making notes, and trying the given programs for Chapter 6, begin working on the questions at the end of the chapter.
(Students who find this work difficult, should go to the Pickup Folder for a file named Ch06Repetition_extraPractice.doc. It gives you additional exercises to help you get used to the ideas of the chapter.)
Several of the questions at the end of the chapter challenging questions for the stronger programming students. If you can't figure those out, don't worry. You can safely ignore them.
QUESTION #9 (p. 114) asks you to find the sum of a number of terms of the series of numbers 1 + x + x**2 + x**3 + x**4 .. . This is a challenging question for the stronger students in the class.
HINTS:
- The tricky part in this question is in how you set up the counter (index) for your counted loop.
- You need to recall a little math - What's the value of x0 and x1?
QUESTION #13 (p. 115) asks you to find all the factors of an integer.
HINTS:
- Try all integers from 1 to the number.
- For each one, how do you decide whether it is a factor? Well, a factor of a number divides into the number evenly. That's the definition of a factor.
- Hint: Have a look at a very useful operator called div (p. 101).
QUESTION #14 (p. 115) asks you to take an integer from the user and output the number of digits in it. This is a challenging question for the stronger students in the class.
HINTS:
- Tell the user to enter an integer of 6 digits or less. The book doesn't mention this, but obviously there's a problem if the user can enter ANY number, no matter how large.
- Use div and multiples of 10 as a divisor.
QUESTION #16 (p. 115) asks you to generate random real numbers between, 4 and 5, 0 and 10, and so on. Be sure you learn how to do this. (It's not hard once you think about it, knowing what rand(number) does.)
Friday, November 27, 2009
Thursday, November 26, 2009
ics2.posterous.com
Our files are now available even when you don't have access to the Pickup Folder.
One shortcoming of this blog is that it doesn't allow the posting of files, so I've found another way to provide you with files. They're mostly the same files that I leave in the Pickup Folder, but with posterous you have access to them when you're not on a school computer.
http://ics2.posterous.com/
Enlarge a file for easier viewing by clicking "Fullscreen" or clicking on the plus sign. The files can also be downloaded or printed.
One shortcoming of this blog is that it doesn't allow the posting of files, so I've found another way to provide you with files. They're mostly the same files that I leave in the Pickup Folder, but with posterous you have access to them when you're not on a school computer.
http://ics2.posterous.com/
Enlarge a file for easier viewing by clicking "Fullscreen" or clicking on the plus sign. The files can also be downloaded or printed.
Monday, November 9, 2009
week of Nov. 9:
test on Norton 7 /
begin Turing Ch. 5
Sunday, November 1, 2009
week of Nov. 2 - finishing Norton, Lesson 7
This week we finish the worksheet for Norton, Lesson 7: Transforming Data into Information, learning about the actual processing of a computer, how it represents data (bits, bytes, etc.), how it processes data into information, and the factors affecting processing speed (RAM, clock speed, etc.). We could finish this topic in the next two classes, in which case we will return to Turing in the last class of this week.
If you want some further information, here's a nice article explaining Unicode, an article at How Stuff Works on bits and bytes and a Wikipedia article on clock speed (clock rate).
There will be a test on Norton, Lesson 7 on Monday, Nov. 9.
Subscribe to:
Posts (Atom)