Review for Test 3 --Covers Ch18-21    

advertisement
CSIS 1
Test 3 Study Guide Chapters 18-21
30 Points
Closed book, but you may bring one sheet of notes. About 20 questions will be
taken from the textbook end of chapter exercises (multiple choice and short answer).
Remember if you need a textbook, there is one on reserve in the library, ask for
Snyder, "Fluency With Information Technology". Check the glossary in the back of
the book, and the answers to selected questions immediately following the glossary.
To prepare, you should review the following questions. Many of the answers can also
be found in the laboratory handouts 4.1 – 4.4 you completed and the powerpoint
slides.
Multiple Choice Questions
Chapter
Chapter
Chapter
Chapter
18: 1,2, 3, 4, 7, 8, 9, 12
19 (we skipped most of this chapter):
20: 1, 3, 7
21: 1, 4, 5, 6, 7, 8
2 – 5 (primarily HTML questions)
Short answer Questions:
Chapter 18: 1, 2, 4, 7, 8, 10, 11, 12, 13, 15
Chapter 19: none apply
Chapter 20: 1, 3, 6, 12
Chapter 21: 1, 2, 3, 4, 5, 7
SKILL – Remaining 10 Points
Be prepared to answer questions similar to the ones appearing below.
Ch18 and Lab 4.1
1) Reading and following instructions expressed in a simple JavaScript program
Ex: after these statements execute, what value is in variables x, y, and z?
x=4; y=5; z=6;
x=y+z;
y= 4 + x / 2;
z= z + 2;
2) Reading and following instructions expressed in a JavaScript if statement. What is
written to the screen after the following statements execute:
temp= 90;
if (temp > 90)
document.write("Too Hot");
if (temp <=90)
document.write("Fine");
Turtle Graphics (Labs 4.2 – 4.4)
3) Drawing a picture from turtle commands given
a)
home(); forward(50);
right(90); forward(50); backward(100);
b)
home(); left(45); forward(50);
right(90); forward(50);
right(90); forward(50);
4) writing instructions to draw an image given to you
Ch20 (mostly see Lab 4.3)
5) Following a program function call and determining its output
function squiggle( a , b )
squiggle(20,40);
{
squiggle(40,20);
forward(a);
right(90);
forward(b);
left(90);
}
Ch 21 (mostly see Lab 4.4) Iteration
6) Writing what happens when a loop executes runs:
for (i = 0; i <5; i = i+1)
{
document.write("i = " + i );
}
for (i = 0; i <4; i++)
{
forward(50); square(10);
backward(50); right(90);
}
Extra Credit:
using turtle graphics and a for-loop to draw a picture given to you
Download