Quiz 005 - Attempt Review3 PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Dashboard / Courses / BLENDED 1923T.

B / BL-CS-301-LEC-1923T / Week 10: Conditional and Loop Statements / Quiz 005

Started on Wednesday, 8 January 2020, 1:58 PM


State Finished
Completed on Wednesday, 8 January 2020, 2:00 PM
Time taken 2 mins 12 secs
Marks 10/10
Grade 100 out of 100

Question 1 What do the properties and methods of the Math object enable you to do?
Correct

Mark 1 out of 1 Select one:


a. Take the square roots and other such values of strings and return a number

b. Go to math class to learn new theorems

c. None of the choices

d. Perform mathematical calculations 

Question 2 Which of the following comparisons will return true?


Correct

Mark 1 out of 1 Select one:


a. 4<3

b. 4!=3 

c. 4==3

d. None of the choices

Your answer is correct.

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


Correct

Mark 1 out of 1 Select one:


a. ==

b. &&

c. =

d. None of the choices 

Your answer is correct.

Question 4 If str = "Jose, Enrique, Vicente" and res = str.slice(15,22), what will be the resulting value of res?
Correct

Mark 1 out of 1 Select one:


a. Vicente 

b. None of the choices

c. ,Vicent

d. Enrique
Question 5 Which of the following comparisons will return false?
Correct

Mark 1 out of 1 Select one:


a. 4!=3

b. 4<=3 

c. 3==3

d. None of the choices

Your answer is correct.

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

Mark 1 out of 1 Select one:


a. document.write(Math.Pi);

b. document.write(Math.PI); 

c. document.write(Math.pi);

d. None of the choices

Question 7 Which of the following statements will return true?


Correct

Mark 1 out of 1 Select one:


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

b. None of the choices

c. !(17>=20) 

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

Your answer is correct.

Question 8 What is the output of the script below? 


Correct <script>
Mark 1 out of 1 var str = "HELLO WORLD";
document.write(str.charAt(1));
</script>

Select one:
a. E 

b. None of the choices

c. H

d. 69

Your answer is correct.


Question 9 Which of the following would correctly generate a random number between 0 and 7?
Correct

Mark 1 out of 1 Select one:


a. var rand_int= Math.floor(Math.random()*8);

b. var rand_int= Math.floor(Math.random()*7); 

c. None of the choices

d. var rand_int= Math.floor(Math.random());

Your answer is correct.

Question 10 What does an assignment operator do?


Correct

Mark 1 out of 1 Select one:


a. Gives a variable a new name

b. Performs a comparison

c. None of the choices

d. Assigns a new value to a variable 

◄ Lesson 8: Conditional and Loop


Jump to... Lesson 9: Javascript Arrays ►
Statements

You might also like