Tom Kelliher, CS 102
Sept. 1, 2006
First quiz in one week. See sample quiz.
Read 1.6-10.
Be able to answer these questions from pp. 40-42: 12, 21, 25, 28, and 31.
Syllabus, survey.
Inside a computer.
A block diagram:
Consider the following simple program:
1: let sum = 0 2: print "How many numbers? " 3: read count 4: let loopCount = count 5: if loopCount equals 0 goto 11 6: print "Next number: " 7: read input 8: let sum = sum + input 9: let loopCount = loopCount - 1 10: goto 5 11: let average = sum / count 12: print "The average is:", average, "." 13: end
Conversion between binary and decimal is fairly simple, but tedious -- write/use a program.