Sunteți pe pagina 1din 12

Dashboard / Courses / BLENDED 1923T.

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

Started on Tuesday, 7 January 2020, 2:24 PM


State Finished
Completed on Tuesday, 7 January 2020, 2:45 PM
Time taken 20 mins 43 secs
Marks 48.00/50.00
Grade 96.00 out of 100.00

Question 1 What surrounds the code inside a function? 


Correct

Mark 1.00 out of Select one:


1.00
a. None of the choices

b. Square brackets - []

c. Curly brackets - {} 

d. Nothing

Your answer is correct.

Question 2 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. None of the Choices

b. date()

c. isset() 

d. strtoupper()

Your answer is correct.

Question 3 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. None of the choices 

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

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


Question 4 It is a PHP function wherein it adds the input data as series of name value pairs in a query string at the end of the
Correct URL.
Mark 1.00 out of
1.00 Select one:
a. None of the Choices

b. $_GET 

c. $_POST

d. ISSET()

Your answer is correct.

Question 5 Who developed the JavaScript?


Correct

Mark 1.00 out of Select one:


1.00
a. Dennis Ritchie

b. None of the choices 

c. Tim Berners-Lee

d. Bill Gates

Question 6 What is the purpose of the <script> and </script> tags? 


Correct

Mark 1.00 out of Select one:


1.00
a. All of the choices

b. To let the browser know the scripting language to be used

c. To tell the browser where a script begins and ends 

d. To point to an external JavaScript file

Your answer is correct.

Question 7 Which of the following correctly calls a function named major_alert() inside the onfocus event handler?
Incorrect

Mark 0.00 out of Select one:


1.00
a. <input type=“text” onfocus=“major_alert();’>

b. None of the choices

c. <input type=“text” onFocus=‘major_alert()”>

d. <input type=“text” onfocus=“major_alert();”> 

Your answer is incorrect.

Question 8 Which of the following correctly calls a function named some_alert () and sends it two string values as
Correct parameters?
Mark 1.00 out of
1.00 Select one:
a. some_alert("some","words);

b. some_alert("some","words"); 

c. None of the choices

d. some_alert ();


Question 9 Variable names are not case sensitive.
Correct

Mark 1.00 out of Select one:


1.00
a. True 

b. False

Question 10 To declare a function, you use the reserved word ________.


Correct

Mark 1.00 out of Select one:


1.00
a. for

b. function 

c. var

d. None of the choices

Question 11 This is the command to display the value stored in the variable.
Correct

Mark 1.00 out of Select one:


1.00
a. None of the choices

b. cout>>

c. Display

d. Echo 

Your answer is correct.

Question 12 How will you end a statement in PHP?


Correct

Mark 1.00 out of Select one:


1.00
a. by putting a dot (.)

b. None of the choices

c. by putting a curly braces (})

d. by putting a semicolon (;) 

Your answer is correct.

Question 13 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 14 Which of the following correctly points to an external JavaScript file named yourfile.js? 
Correct

Mark 1.00 out of Select one:


1.00
a. <script type="text/javascript" link="yourfile.js"></script>

b. None of the choices

c. <script type= "text/javascript" src="yourfile.js"></script> 

d. <script language="yourfile.js"></script>

Your answer is correct.

Question 15 Which of the following is not an include statement?


Correct

Mark 1.00 out of Select one:


1.00
a. <?php include_once 'include/external.php'; ?>

b. <?php include 'include/external.php'; ?>

c. <?php require 'include/external.php'; ?>

d. <?php include_all 'include/external.php' ?> 

Your answer is correct.

Question 16 It is a function in the PHP that get the date of the server.
Correct

Mark 1.00 out of Select one:


1.00
a. array()

b. None of the Choices

c. date() 

d. strtoupper()

Your answer is correct.

Question 17 JavaScript is _________.


Correct

Mark 1.00 out of Select one:


1.00
a. None of the choices

b. server-side language

c. object deficient

d. Object based 


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

Select one:
a. Maria

b. Isabella

c. Georgina 

d. None of the choices

Your answer is correct.

Question 19 In JavaScript, you access object properties through the use of the
Correct

Mark 1.00 out of Select one:


1.00
a. multiplication operator

b. You can't access the properties of an object

c. addition operator

d. None of the choices 

Question 20 It is a function that display the content of the array.


Correct

Mark 1.00 out of Select one:


1.00
a. $Flowers = array();

b. $Flowers = [];

c. print_r($Flowers); 

d. None of the Choices

Your answer is correct.

Question 21 Which of the following would correctly write the value of pi on a Web page?
Correct

Mark 1.00 out of Select one:


1.00
a. document.write(Math.PI); 

b. None of the choices

c. document.write(Math.Pi);

d. document.write(Math.pi);


Question 22 What is the result of the script below? 
Correct
<script>
Mark 1.00 out of
var x = 0;
1.00
var e = "gsbatingggl.x";
var domain = "";
for(var ctr = 0; ctr < e.length; ctr++)
{
if(e[ctr] == "@")
{
domain = e.substring(ctr);
if((domain == "@yahoo.com.ph") ||
(domain == "@yahoo.com") ||
(domain == "@edu.gov"))
{
x++1;
}
}
}
document.write(x);
</script>

Select one:
a. 12

b. None of the choices

c. 0 

d. 1

Your answer is correct.

Question 23 Which of the following would be valid as the first line of an if/else statement?
Correct

Mark 1.00 out of Select one:


1.00
a. if (y ! 7)

b. if (x=2)

c. if (x==2) && (y > x)

d. None of the choices 

Your answer is correct.

Question 24 Which of the following is not a JavaScript object?


Correct

Mark 1.00 out of Select one:


1.00
a. window

b. None of the choices 

c. link

d. frame


Question 25 What is the result of the script below?
Correct <script>
Mark 1.00 out of var greeting;
1.00 var time = 10;
if (time < 10) {
greeting = "Good morning";
} else if (time < 20) {
greeting = "Good day";
} else {
greeting = "Good evening";
}
document.write(greeting);
</script>

Select one:
a. Good evening

b. Good day 

c. Good morning

d. None of the choices

Your answer is correct.

Question 26 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 27 You should avoid using JavaScript reserved words as variable names.
Incorrect

Mark 0.00 out of Select one:


1.00
a. True

b. False 

Question 28 In a regular array, access to an element is usually through the use of a(n) __________.
Correct

Mark 1.00 out of Select one:


1.00
a. index number 

b. random number

c. string

d. None of the choices


Question 29 It is a server side scripting language that is designed to be embedded because it is mixed in the HTML Markup.
Correct This Language can process and email contact forms, upload & file from online forms, generate thumbnails for
Mark 1.00 out of large images, watermark images, read and write files and communicate with a database.
1.00

Select one:
a. JAVA

b. PHP 

c. CSS

d. None of the choices

Your answer is correct.

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

Mark 1.00 out of Select one:


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

b. None of the choices

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

d. To create a typing script

Question 31 The external JavaScript file must contain the <script> tag.
Correct

Mark 1.00 out of Select one:


1.00
a. True

b. False 

Your answer is correct.

Question 32 A mouseout event occurs when a viewer clicks an element on the page.
Correct

Mark 1.00 out of Select one:


1.00
a. True

b. False 

Question 33 Which of the following comparisons will return false?


Correct

Mark 1.00 out of Select one:


1.00
a. 3==3

b. 4!=3

c. 4<=3 

d. None of the choices

Your answer is correct.


Question 34 JavaScript is a _________ language that doesn't require a program to be compiled before it is run.
Correct

Mark 1.00 out of Select one:


1.00
programming

server-side

scripting 

None of the choices

Your answer is correct.

Question 35 JavaScript reserved words can be used as function names.


Correct

Mark 1.00 out of Select one:


1.00
a. False 

b. True

Question 36 What is the original name of JavaScript?


Correct

Mark 1.00 out of Select one:


1.00
a. None of the choices

b. Java

c. LiveScript

d. Mocha 

Question 37 Refers to an array of all objects of a particular type.


Correct

Mark 1.00 out of Select one:


1.00
a. object collection 

b. None of the choices

c. object properties

d. object method

Question 38 To write a string of text on a Web page, the _________ method is used.
Correct

Mark 1.00 out of Select one:


1.00
a. document.print() 

b. window.print()

c. document,type()

d. None of the choices

Question 39 Each object in JavaScript has properties associated with it.


Correct

Mark 1.00 out of Select one:


1.00
a. False

b. True 


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

Mark 1.00 out of Select one:


1.00
a. document.write("I like to myhobby every weekend");

b. None of the choices

c. document.write("I like to +myhobby+ every weekend");

d. document.write("I like to " +myhobby+ " every weekend"); 

Question 41 The getMonth() method returns the same number as the number that represents the current month (for
Correct example, returns 1 if the current month is January).
Mark 1.00 out of
1.00 Select one:
a. False

b. True 

Question 42 An external JavaScript file commonly uses a filename extension of _______.


Correct

Mark 1.00 out of Select one:


1.00
a. None of the choices

b. .jav

c. .html

d. .js 

Question 43 JavaScript is a language that must be compiled while Java is a language that must be interpreted.
Correct

Mark 1.00 out of Select one:


1.00
a. True

b. False 

Question 44 Part of the browser that understands JavaScript.


Correct

Mark 1.00 out of Select one:


1.00
a. Rendering Engine

b. JavaScript Interpreter 

c. JavaScript Compiler

d. None of the choices

Question 45 Which of the following comparisons will return true?


Correct

Mark 1.00 out of Select one:


1.00
a. 4!=3 

b. None of the choices

c. 4==3

d. 4<3

Your answer is correct.


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

Mark 1.00 out of Select one:


1.00
a. www

b. public_html

c. htdocs

d. \\AMA-PC1\user 

Your answer is correct.

Question 47 Part of the web browser that understands HTML and CSS.
Correct

Mark 1.00 out of Select one:


1.00
a. JavaScript Interpreter

b. Rendering Engine 

c. None of the choices

d. JavaScript Compiler

Question 48 The script tag's attribute that tells the browser the language of the script.
Correct

Mark 1.00 out of Select one:


1.00
a. type 

b. id

c. src

d. None of the choices

Question 49 Which of the following would be valid as the first line of an if/else statement?
Correct

Mark 1.00 out of Select one:


1.00
a. if (x=2)

b. if (x==2) && (y > x)

c. None of the choices 

d. if (y ! 7)

Your answer is correct.

Question 50 Is use to change the color of the web page to blue.


Correct

Mark 1.00 out of Select one:


1.00
a. None of the above

b. document.write(color.blue)

c. document.fgcolor = blue

d. window.bgcolor = blue 


◄ Quiz 006 Jump to...

S-ar putea să vă placă și