Professional Documents
Culture Documents
Internet And World Wide Web How To Program 5th Edition Paul Deitel Test Bank instant download all chapter
Internet And World Wide Web How To Program 5th Edition Paul Deitel Test Bank instant download all chapter
https://testbankdeal.com/product/internet-and-world-wide-web-how-
to-program-5th-edition-deitel-solutions-manual/
https://testbankdeal.com/product/visual-c-2012-how-to-
program-5th-edition-deitel-test-bank/
https://testbankdeal.com/product/java-how-to-program-9th-edition-
deitel-test-bank/
https://testbankdeal.com/product/c-how-to-program-7th-edition-
deitel-test-bank/
Android How to Program 3rd Edition Deitel Test Bank
https://testbankdeal.com/product/android-how-to-program-3rd-
edition-deitel-test-bank/
https://testbankdeal.com/product/c-how-to-program-10th-edition-
deitel-test-bank/
https://testbankdeal.com/product/visual-c-2012-how-to-
program-5th-edition-deitel-solutions-manual/
https://testbankdeal.com/product/visual-c-how-to-program-6th-
edition-deitel-test-bank/
https://testbankdeal.com/product/visual-c-how-to-program-6th-
edition-deitel-test-bank-2/
Chapter 9: JavaScript: Functions
9.1 Introduction
9.1 The best way to develop and maintain a large program is to construct it from small, simple pieces called
________.
a) scripts
b) modules
c) scriptlets
d) objects
ANS: b
9.2 The technique of developing and maintaining a large program by constructing it from small, simple pieces is
called ________.
a) divide and conquer
b) modular programming
c) multitasking
d) multiprogramming
ANS: a
9.4 The “prepackaged” functions that belong to JavaScript objects such as Math.pow and Math.round are often called
________.
a) subroutines
b) routines
c) methods
d) functions
ANS: c
9.6 What is the result of writing the keyword var in a function parameter list?
a) The result would be a JavaScript runtime error.
b) The parameter following the keyword would have global scope.
c) The parameter following the keyword would have local scope.
d) The parameter following the keyword would become a static variable.
ANS: a
9.7 What would the function cube return, assuming it is called with the statement cube( 3 )?
function cube( y );
{
return y * y * y;
}
a) JavaScript runtime error
b) 3
c) 9
d) 27
ANS: a
9.11 The value a in the following statement is called the ________ and the value b is called the ________.
face = Math.floor( a + Math.random() * b );
a) scaling factor, shifting value
b) shifting value, scaling factor
c) scaling value, shifting factor
d) shifting factor, scaling value
ANS: b
9.12 The style of programming in which the user interacts with a GUI component is called ________ programming.
a) object-oriented
b) automatic
c) event-driven
d) modular
ANS: c
9.6 Example: Game of Chance; Introducing the HTML5 audio and video Elements
9.13 If the HTML5 form game has a text field named point in it, what is the proper way to set the text associated
with point to 10?
a) game.point = "10"
b) game.point.text = "10"
c) game.point.caption = "10"
d) game.point.value = "10"
ANS: d
9.14 Which of the following is used to access members (or properties) of form elements?
a) *
b) ,
c) .
d) ;
ANS: c
9.15 Nested in the audio element are two ________ specifying the locations of the audio clip in MP3 and OGG
formats, respectively.
a) source elements
b) media elements
c) preload attributes
d) location elements
ANS: a
9.20 JavaScript references the ________ object for you when you call its functions, so you don’t need to use it
directly.
a) document
b) local
c) scriptlevel
d) Global
ANS: d
9.9 Recursion
9.21 A function that calls itself either directly or indirectly through another function is called a ________ function.
a) base case
b) iterative
c) recursive
d) fibonacci
ANS: c
9.23 Iteration uses ________ statements and recursion uses ________ statements.
a) counter-recursive, counter-iterative
b) repetition, function calling
c) repetition, selection
d) function-calling, repetition
ANS: c
BOYS AT PLAY.
Here are three boys at play. Each boy has a hoop, which he
strikes with a stick, and it rolls along. It is very pleasant to roll a
hoop. If you strike it hard, it flies along very fast, and you must run
with all your might to catch it.
You must take care not to drive your hoop among horses. I once
knew a little boy playing with his hoop in a street. A horse was
coming along, but the boy was looking at his hoop, and he did not
see the horse. His hoop rolled close to the horse’s fore feet, and the
boy ran after it.
The horse was going fast, and he struck the boy with his foot. The
boy fell dawn, and the horse stepped on his leg. The poor boy’s leg
was broken, and it was many weeks before he got well.
THE GIRL AND KITTEN.
“Come, pretty Kit, come, learn to read;
Here with me sit; you must indeed.
Not know your letters! fie, fie! for shame!
The book I’ll hold; come! spell your name!
Now try to say K I T, Kit;
For you may play where you think fit,
Upon the bed, or on the tree,
When you have said your A B C.”
’T was snug and warm in Mary’s lap,
So pussy thought she’d take a nap.
She went to sleep,—the lazy elf!
And Mary read the book herself.
She learned to read, she learned to spell,
And said her lesson very well.
And now, my little reader, say,
If you from books will turn away,
And be like Kit, an idle thing,—
Now catch a mouse, now twirl a string;
Or will you learn to read and spell,
And say your lessons very well?
Varieties.
If you think the above worthy a place, you can publish it.
You may hear from me again soon. My sheet is full, so I have
but to subscribe myself,
Very respectfully,
W. F. W.
Dear Sir:
My little daughter has handed me the following puzzle to
send to you for your next number, which please insert, and
oblige
A Subscriber.