Skill Test Questions

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Skill test questions (JavaScript 12 + Python 12+ Database 6)

[Text case is important, please maintain case exactly same as given]

JavaScript

Coding Questions [Q1-Q6]

Q1) var x = null; console.log(x?"0":"1");


A) 0 B) 1 C) error D) null
Ans) B

Q2) eval(Array.from({ length: 3 }, (_, x) => (x + 1) * 3 ).join('+'));


A) 9 B) 12 C) 15 D) 18
Ans) D

Q3) var x=[{0:[1,2]},[3,{4:5}],6]; console.log(x[2]);


A) 2 B) 3 C) 5 D) 6
Ans) D

Q4) var x = Math.abs("null"); console.log(x);


A) null B) 0 C) NaN D) 1
Ans) C

Q5) x=new Map(); x['x']=0; console.log(x.has('x'));


A) true B) false C) error D) 0
Ans) A

Q6) console.log(0*1/0);
A) 0 B) 1 C) NaN D) Infinity
Ans) C

Theory Questions [Q7-Q12]

Q7) What type of data can be retrieved using XMLHttpRequest


A) Text B) JSON C) XML D) Any
Ans) D

Q8) Which of the following are best for error handling in Asynchronous JavaScript
A) Async callbacks B) Promises C) Events D) None
Ans) B

Q9) JSONP stands for


A) JSON with Parity B) JSON with Pairs C) JSON with Padding D) JSON with POST
Ans) C

Q10) Which type of values in JavaScript cannot auto-convert to strings


A) Boolean B) Null C) Number D) Symbol
Ans) D

Q11) Which of the following is not a javascript keyword


A) on B) yield C) catch D) in
Ans) A

Q12) In Javascript, data passed between the main page and workers is __________
A) shared, not copied B) copied, not shared C) copied and shared D) neither copied nor shared
Ans) B
Python
Coding Questions [Q13-Q18]

Q13)
x=[1,2,3]
print(x[-3])
A) 1 B) 2 C) 3 4) Error
Ans) A

Q14)
x=[1,2,3]
print(x*2)
A) [1,2,3] B) [2,4,6] C) [1,2,3,1,2,3] 4) Error
Ans) C

Q15)
x=”121”
print(x==x[::-1])
A) 1 B) 2 C) True D) False
Ans) C

Q16)
Print(3^3/3)
A) 0 B) 0.333… C) 1 D) Error
Ans) D

Q17)
x = ('ABC', 2)
print(x)
A) ABCABC B) ABC2 C) ‘ABC’,2 D) (‘ABC’,2)
Ans) D
Q18)
x = 1 if True else 0
print(x)
A) 0 B) 1 C) True D) Error
Ans) B

Theory Questions [Q19-Q24]

Q19) To store data in key/value pairs, which data type is used in python
A) tuple B) list C) array D) dictionary
Ans) D

Q20) Python is a ______________ language


A) Compiled B) Interpreted C) assembly D) None of these
Ans) B
Q21) rshift() overloads which operator in python
A) << B) >> C) > D) <
Ans) B

Q22) Which one of the following is a keyword in python


A) lambda B) var C) const D) catch
Ans) A

Q23) Which keyword is used to create an alias while importing a module


A) import B) from C) as B) include
Ans) C

Q24) Which module is used for http client in python


A) http B) requests C) SimpleHTTPServer D) SocketServer
Ans) B
Database

Q25) Which key is used to represent relationship between tables

A) Primary Key B) Foreign Key C) Secondary Key D) None of these

Ans) B

Q26) Which one of following data structures is a hierarchical model

A) tree B) graph C) queue D) stack

Ans) A

Q27) Which is the document database

A) MongoDB B) DynamoDB C) Couchbase D) All of these

Ans) D

Q28) what is the result of following query in mysql

SELECT now();

A) current date B) current time C) current date and time D) Error

Ans) C

Q29) BSON stands for

A) Bidirectional JSON B) Binary JSON C) Big JSON D) Base JSON

Ans) B

Q30) query to get number of rows from a table:

select _____________ from table_name;

A) count(*) B) rows(*) C) all(*) d) None of these

Ans) A

You might also like