Docsity

Input Element - Computer Science - Quiz, Exercises of Computer Science

Toggle sidebar
bg1
Signature ____________________ Name _____________________
cs3wb_____
Student ID ___________________ Score:
Quiz 4
CSE 3
Winter 2007
Circle the correct answer.
1. In JavaScript, global variable declarations are placed:
A. inside the curly braces { } of a function definition
B. in the parens ( ) of a function
C. after the keyword global
D. inside <script> </script> tags
2. The JavaScript statement that is used to insert HTML code or text into a page as it is being rendered:
A. document.render()
B. document.insert()
C. document.print()
D. document.write()
3. In Microsoft Excel, which of the following is a valid cell range:
A. 4C:8D
B. C4-D8
C. 4C-8D
D. C4:D8
4. In the if statement โ€“ if ( exp ) โ€“ the exp part must be:
A. an assignment statement
B. a boolean statement
C. a string
D. an arithmetic expression (an expression using arithmetic operators like +, -, *, /)
5. Input controls like buttons using the <input> tag are usually enclosed in
A. <script> </script> tags
B. if or if-else statements
C. <form> </form> tags
D. <p> </p> tags
6. Given the assignment document.X.Y.Z = 420; which of the following naming is correct:
A. attribute Z on input element Y in form X on this document
B. attribute X in input element Y in form Z on this document
C. input element X in form Y with attribute Z on this document
D. attribute document in input element Z on form Y in table X on this html page
(Over)
pf2

Partial preview of the text

Download Input Element - Computer Science - Quiz and more Exercises Computer Science in PDF only on Docsity!

Signature ____________________ Name _____________________

cs3wb_____

Student ID ___________________ Score:

Quiz 4

CSE 3

Winter 2007

Circle the correct answer.

  1. In JavaScript, global variable declarations are placed: A. inside the curly braces { } of a function definition B. in the parens ( ) of a function C. after the keyword global D. inside tags
  2. The JavaScript statement that is used to insert HTML code or text into a page as it is being rendered: A. document.render() B. document.insert() C. document.print() D. document.write()
  3. In Microsoft Excel, which of the following is a valid cell range: A. 4C:8D B. C4-D C. 4C-8D D. C4:D
  4. In the if statement โ€“ if ( exp ) โ€“ the exp part must be: A. an assignment statement B. a boolean statement C. a string D. an arithmetic expression (an expression using arithmetic operators like +, -, *, /)
  5. Input controls like buttons using the tag are usually enclosed in A. tags B. if or if-else statements C. tags D.

    tags
  6. Given the assignment document.X.Y.Z = 420; which of the following naming is correct: A. attribute Z on input element Y in form X on this document B. attribute X in input element Y in form Z on this document C. input element X in form Y with attribute Z on this document D. attribute document in input element Z on form Y in table X on this html page

(Over)

  1. Math.random() returns a pseudo-random value in the range: A. 0 to MAX_INT B. -MAX_INT to +MAX_INT C. 0 to .99999999... D. 0 to 1
  2. In JavaScript, 14%3 is: A. 4. B. 2 C. 14 percent time 3 D. 4
  3. Which of the following would correctly produce the string "Give Me 5" in JavaScript: A. Give + Me + 5 B. "Give '+' Me '+' 5" C. "Give " + Me + " 5" D. 'Give' + " Me " + 5

Fill in the blanks.

  1. The logical AND operator/symbol in JavaScript is _________.
  2. The year 1800 _________(is/is not) a leap year.
  3. What is the name of the graphic viewer/editor for PCs I recommended in class ____________________.
  4. The size attribute for a text box input element sets the width of the text box measured by the number

of ______ characters.

  1. When importing text files into Microsoft Excel, a common character used to delimit/separate

cell data is ________.

  1. Fill in the blank to create a button with the string "Push Me" as the label on the button.