Sie sind auf Seite 1von 11

Dashboard / Courses / BLENDED 1923T.

B / BL-CS-301-LEC-1923T / Week 14: Final Exam / Finals

Started on Wednesday, 8 January 2020, 2:27 PM


State Finished
Completed on Wednesday, 8 January 2020, 2:56 PM
Time taken 28 mins 29 secs
Marks 49.00/50.00
Grade 98.00 out of 100.00

Question 1 Which of the following statements would be valid in JavaScript?


Correct

Mark 1.00 out of Select one:


1.00
a. document.write("John said, \"Hi!\""); 

b. None of the choices

c. document.write("John said, "Hi!"");

d. document.write('John said, "Hi!"");

Question 2 What does the following code do?


Correct var s_list= new Array()
Mark 1.00 out of
1.00 Select one:
a. None of the choices 

b. Creates an array that can never have any elements added to it

c. Creates an empty array named list

d. Creates an array named s_list with the default number of elements, 10

Question 3 What property of the Array object will return the numeric value of the length of an array?
Correct

Mark 1.00 out of Select one:


1.00
a. The length property 

b. The getlength property

c. None of the choices

d. The lengthOf property


Question 4 What is the result of the script below?
Correct <script>
Mark 1.00 out of var n = ["Maria", "Isabella", "Georgina"];
1.00 n.shift();
n.unshift("Maria");
document.write(n);
</script>

Select one:
a. None of the choices

b. Maria,Isabela,Georgina,Maria

c. Maria,Isabela,Georgina 

d. Isabela,Georgina,Maria

Your answer is correct.

Question 5 Active scripting is not a programing language instead it is a plain text interpreted to make a dynamic and
Correct interactive web pages.
Mark 1.00 out of
1.00 Select one:
a. True

b. False 

Question 6 Which of the following is not a JavaScript operator?


Correct

Mark 1.00 out of Select one:


1.00
a. =

b. ==

c. &&

d. None of the choices 

Your answer is correct.

Question 7 Which of the following is something you should have to use the JavaScript?
Correct

Mark 1.00 out of Select one:


1.00
a. 50GB hard drive

b. None of the choices

c. C++ compiler

d. Web browser 

Question 8 What do you use to enclose the blocks of code in conditionals and loops?
Correct

Mark 1.00 out of Select one:


1.00
a. None of the choices

b. Square brackets

c. Parentheses

d. Curly brackets 
Question 9 What is the output of the script below? 
Correct <script>
Mark 1.00 out of var str = "HELLO WORLD";
1.00 document.write(str.charAt(1));
</script>

Select one:
a. 69

b. H

c. None of the choices

d. E 

Your answer is correct.

Question 10 It acts as the placeholder for unknown or changing values.


Correct

Mark 1.00 out of Select one:


1.00
a. Functions

b. Loops

c. Variable 

d. Arrays

Your answer is correct.

Question 11 This are statement that performs preset of tasks.


Incorrect

Mark 0.00 out of Select one:


1.00
a. Variable

b. Conditional Statement

c. Functions

d. Loops 

Your answer is incorrect.

Question 12 All object collections are supported by all browsers or browser versions.
Correct

Mark 1.00 out of Select one:


1.00
a. False 

b. True

Question 13 A mouseover event occurs when:


Correct

Mark 1.00 out of Select one:


1.00
a. None of the choices

b. The viewer clicks the mouse while the cursor is over a button.

c. The viewer moves the mouse cursor over an element on the page. 

d. The viewer clicks a link, linked image, or linked area of an image map.
Question 14 Which of the following is a Free PHP Editor?
Correct

Mark 1.00 out of Select one:


1.00
a. PhpED

b. Dreamweaver

c. Zend Studio

d. Komodo Edit 

Your answer is correct.

Question 15 Which of the following successfully prints a variable named name by adding it to a set of strings?
Correct

Mark 1.00 out of Select one:


1.00
a. document.write("Hello" + "name" + "!");

b. document.write("Hello " + name!);

c. None of the choices 

d. document.write("Hello name!");

Question 16 It holds multiple values.


Correct

Mark 1.00 out of Select one:


1.00
a. Loops

b. Functions

c. Variable

d. Arrays 

Your answer is correct.

Question 17 This are statements that make decision.


Correct

Mark 1.00 out of Select one:


1.00
a. Variable

b. Functions

c. Conditional Statement 

d. Loops

Your answer is correct.

Question 18 It is a function in the PHP that check whether the variable has been set.
Correct

Mark 1.00 out of Select one:


1.00
a. strtoupper()

b. None of the Choices

c. isset() 

d. date()

Your answer is correct.


Question 19 How do you write "Hello World" in an alert box?
Correct

Mark 1.00 out of Select one:


1.00
a. msgBox(“Hello World”)

b. msg(“Hello World”)

c. alert(“Hello World”) 

d. None of the choices

Your answer is correct.

Question 20 Which of the following declares a variable named pagenumber and gives it a value of 240?
Correct

Mark 1.00 out of Select one:


1.00
a. None of the choices

b. pagenumber=220;

c. var PageNumber=240;

d. var pagenumber=240; 

Question 21 What are two of the benefits of using variables?


Correct

Mark 1.00 out of Select one:


1.00
a. They make the purpose of your code clearer, and they make it harder for noncoders to understand the
script.

b. None of the choices

c. They can save you time in writing and updating your scripts, and they make it harder for noncoders to
understand the script.

d. They can save you time in writing and updating your scripts, and they can make the purpose of your code
clearer. 

Question 22 Which of the following correctly assigns the result of a function named get_something () to a variable named
Correct shopping?
Mark 1.00 out of
1.00 Select one:
a. var Shopping=get_Something;

b. var shopping=get_something (); 

c. None of the choices

d. var shopping=“get_something”;

Your answer is correct.

Question 23 Rather than executing every single line of code within the script, a conditional statement allows certain sections
Correct of the script to be executed only when a particular condition is met.
Mark 1.00 out of
1.00 Select one:
a. False

b. True 
Question 24 This are statements that performs repetitive tasks.
Correct

Mark 1.00 out of Select one:


1.00
a. Loops 

b. Conditional Statement

c. Functions

d. Variable

Your answer is correct.

Question 25 Which of the following statements will return true?


Correct

Mark 1.00 out of Select one:


1.00
a. None of the choices

b. (3==3)&&(5<1)

c. !(17>=20) 

d. (1==1)&&(2<0)

Your answer is correct.

Question 26 What is the result of the script when the user input a small letter ‘a’?
Correct <head>
Mark 1.00 out of <script>
1.00 function myFunction() {
var x = document.getElementById("fname");
x.value = x.value.toUpperCase();
}
</script>
</head>
<body>
Enter your name: <input type="text" id="fname" onchange="myFunction()">
</body>
</html>

Select one:
a. c

b. None of the choices

c. 65

d. A 

Your answer is correct.

Question 27 What does an assignment operator do?


Correct

Mark 1.00 out of Select one:


1.00
a. Gives a variable a new name

b. None of the choices

c. Assigns a new value to a variable 

d. Performs a comparison
Question 28 What symbol is used as the assignment operator in JavaScript?
Correct

Mark 1.00 out of Select one:


1.00
a. +

b. None of the choices 

c. :

Question 29 The mousedown event uses what keyword as its event handler?
Correct

Mark 1.00 out of Select one:


1.00
a. mousedown

b. onmousedown

c. None of the choices 

d. onmouseout

Question 30 The choice of a Web browser is up to you, as long it's compatible with _________.
Correct

Mark 1.00 out of Select one:


1.00
a. None of the choices

b. VBScript

c. JavaScript 

d. Flash MX

Question 31 When would it be a good idea to use an external JavaScript file?


Correct

Mark 1.00 out of Select one:


1.00
a. When your Web site viewers have older browsers

b. When the script is short or going to be used in only one HTML document

c. None of the choices

d. When the script is very long or needs to be placed in more than one HTML document 

Question 32 Which of the following language is used to program the behavior of web pages?
Correct

Mark 1.00 out of Select one:


1.00
a. None of the choices 

b. CSS

c. HTML

d. Java

Question 33 Which of the following is a valid use of the window.alert() method?


Correct

Mark 1.00 out of Select one:


1.00
a. None of the choices 

b. window.alert("This is text);

c. win.alt("This is text");

d. window.alert('This is text");
Question 34 Which of the following string declarations is invalid?
Correct

Mark 1.00 out of Select one:


1.00
a. var mytext= “Here is \n some text!”;

b. var mytext=‘Here is some text!’;

c. var mytext=“Here is some text!”;

d. None of the choices 

Question 35 Why should you use the type attribute in the opening script tag?
Correct

Mark 1.00 out of Select one:


1.00
a. To create a typing script

b. To let the browser know what type of coder you are

c. None of the choices

d. To be sure the browser does not interpret your JavaScript as another scripting language and to ensure the
Web page validates in XHTML 

Question 36 Which of the following indicates that a single line of commentary will follow it within JavaScript code?
Correct

Mark 1.00 out of Select one:


1.00
a. <!--

b. None of the choices

c. // 

d. /*

Question 37 It is named value pairs that are stored in the browser and they're sent to the web server with each page request.
Correct

Mark 1.00 out of Select one:


1.00
a. Functions

b. None of the Choices

c. Cookies 

d. Session

Your answer is correct.

Question 38 It is a function in the PHP that converts the string into Upper case.
Correct

Mark 1.00 out of Select one:


1.00
a. None of the Choices

b. array()

c. strtoupper() 

d. date()

Your answer is correct.


Question 39 Which of the following statements will return false?
Correct

Mark 1.00 out of Select one:


1.00
a. (“a”==“a”)&&(“c”!=“d”)

b. None of the choices

c. (4>=4)&&(5<=2) 

d. !(3<=1)

Your answer is correct.

Question 40 Which of the following correctly assigns the day of the week for an instance of the Date object named rightnow
Correct to a variable named weekday?
Mark 1.00 out of
1.00 Select one:
a. None of the above 

b. var weekday= right now.getDay();

c. var rightnow= weekday.getDay();

d. var weekday= rightnow.getDate();

Question 41 In the process of PHP which what is the missing step?


Correct

Mark 1.00 out of 1st: The client browser sends a request to the Web Server
1.00
2nd: The Webserver will simply respond to the client if the page consist of HTML, CSS, Images and Javascript.
However, if the there is a PHP in the webpage, it will proceed to the 3rd step.
3rd: x x x x
4th: If there is a database involve the PHP engine will send the file to the database for processing.
5th: After the database have processed the file it will then return it to the PHP engine and the PHP Engine will
return it to the web server. The web server is the one responsible for sending it back to the client browser.

Select one:
a. The Webserver will send the PHP webpage to the PHP Engine for processing. 

b. The Webserver will then interpret the PHP Webpage and send it back to the Database.

c. None of the choices

d. The Webserver will then interpret the PHP Webpage and send it back to the Database.

Your answer is correct.

Question 42 Which of the following correctly calls myFunction() whenever a user clicks a button?
Correct

Mark 1.00 out of Select one:


1.00
a. <button> myFunction () </button>

b. None of the choices 

c. <input type = "button" value = "Submit" onClick="checkForm(this.form)">

d. <submit> onclicked=myFunction () </submit>

Your answer is correct.


Question 43 Which of the following is not the file to access if you want to change your server's time?
Correct

Mark 1.00 out of Select one:


1.00
a. .htaccess

b. index.php 

c. php.ini

d. user.ini

Your answer is correct.

Question 44 Which of the following is not a commenting style?


Correct

Mark 1.00 out of Select one:


1.00
a. #

b. /*                 */

c. //

d. %                   % 

Your answer is correct.

Question 45 How many times can you nest a code block within another?
Correct

Mark 1.00 out of Select one:


1.00
a. None

b. None of the above

c. As many times as you like (though enough nesting could run the browser out of memory) 

d. Once

Question 46 It is the command used to incorporate an external page into your html.
Correct

Mark 1.00 out of Select one:


1.00
a. post

b. get

c. include 

d. None of the Choices

Your answer is correct.

Question 47 What does a comparison operator do?


Correct

Mark 1.00 out of Select one:


1.00
a. Performs a mathematical calculation

b. Compares two values or statements, and returns a value of true or false 

c. None of the choices

d. Deals with bits and is not important right now


Question 48 Which of the following does not belong to the group?
Correct

Mark 1.00 out of Select one:


1.00
a. \\AMA-PC1\user 

b. public_html

c. htdocs

d. www

Your answer is correct.

Question 49 The _______ signals the end of a JavaScript statement.


Correct

Mark 1.00 out of Select one:


1.00
a. None of the choices 

b. colon

c. period

Question 50 The keydown event occurs when a viewer presses down a key on the keyboard.
Correct

Mark 1.00 out of Select one:


1.00
a. False

b. True 

◄ Quiz 006 Jump to...

Das könnte Ihnen auch gefallen