Font size
WorksheetsKFIN_Tech_Screening_Test_Python_102_Jan'24
Total questions: 60
Worksheet time: 3600secs
Which of the following is NOT a rule for React Hooks?
Hooks cannot be conditional
Hooks can only be called at the top level of a component
Hooks can be called in class or function components
Hooks can only be called in inside React function components
Which among these is NOT a component life-cycle method?
componentDidMount()
componentDidUpdate()
componentWillMount()
componentWillUnmount()
Which of the following is used for creating API's in JS?
How do you fix the syntax error that results from running this code?
Wrap the object in parentheses.
Call the function from another file.
Replace the with an array
Add a return statement before the first curly brace.
Which table property is used to specify the distance between its two cells.
padding
spacing
cell-padding
border-spacing
Which of the following tag represents a generic document or application section in HTML5?
article
section
aside
header
What css rule creates a flexbox container?
flex: box
display: flexbox
flex: container
display: flex
To display writing on the screen you must include this direction; in javascript
A variable in javascript
What is MongoDB primarily known as?
Relational Database Management System
Document-Oriented Database Management System
Graph Database Management System
Key-Value Database Management System
Which MongoDB operator is used to query for documents where a specific field's value is greater than a specified value?
$eq
$gt
$lt
$in
What is the purpose of the find method in MongoDB?
To update documents in a collection
To delete documents from a collection
To insert documents into a collection
To query documents in a collection
Which command is used to create a new table/collection in MongoDB if it doesn't exist?
db.createDatabase()
db.ensureDatabase()
db.newDatabase()
db.createCollection()
What is the default port number for MongoDB?
27017
8080
3000
5432
What happens if you attempt to update a document in MongoDB with the upsert option set to true, but the document does not exist
An error is thrown
A new document is inserted with the specified update.
The existing document is updated.
Nothing happens.
app.use is used for
The middleware function is executed when the base of the requested path matches path.
Routes HTTP GET requests to the specified path with the specified callback functions.
Both mentioned
None mentioned
Identify the last node in the post-order traversal of this binary tree.
8
1
9
5
The minimum number of nodes in a tree with height m is _____
2*m
m-1
m
m+1
In which condition is the React.js Lifecycle method static getDerivedSateFromProps(props, state) is call
When the state of the component is updated
When a component is created for the first time
Both
None of the mentioned
Which of the following is method is not a part of ReactDOM?
ReactDOM.hydrate()
ReactDOM.destroy()
ReactDOM.createPortal()
All of the mentioned
Which of the following is used to pass data to a component from outside in React?
props
render with arguments
setState
PropTypes
What is the output of the given code?
10 20 10
10
20
10 20
What is the output of the given code?
10 20 10 20
10 20 10
10 20 20
Error
Function header in Python contains _________________.
function name
list of parameters
return type
all the above
Only A & B
___________ are the arguments passed to a function in correct positional order.
Keyword arguments
Default arguments
Variable-length arguments
Required arguments
none of the above
times is ________________ type of argument.
default arguments
keyword arguments
positional arguments
arbitrary positional arguments
arbitrary keyword arguments
What is the output of the attached python code?
Take the card out of ATM
Value Error Occurred
Done
Take the card out of ATM
Type Error Occurred
Take the card out of ATM
Some Error Occurred
Take the card out of ATM
Withdraw
Done
What is the output of the attached python code?
100
0
Zero Division Error Occurred
Another error will occur, program will "crash"
What is the output of the attached python code?
Function name error
Sum finally
Invocation finally
Invocation name error
Invocation finally
Sum finally
Invocation name error
Invocation finally
Function name error
Sum finally
Choose the correct function from the following list to get the random integer between 99 to 200, which is divisible by 3.
random.randrange(99, 200, 3)
random.randint(99, 200, 3)
random.random(99, 200, 3)
Which of the following query is correct to get Current Date from Query?
A. SELECT DATE ( NOW() ) as today;
B. SELECT DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) as today;
A. SELECT DATE ( NOW() ) as today;
B. SELECT DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) as today;
Both A and B
None
The _________ statement is used to delete a table.
DROP TABLE
DELETE TABLE
DEL TABLE
REMOVE TABLE
The SQL keyword BETWEEN is used:
For ranges.
To limit the columns displayed.
As a wildcard.
None of the above
Write a query to display first_name and last_name of all employees who have their first_name starting with 'A'.
Select first_name from employess where first_name LIKE '%A';
Select first_name from employess where first_name LIKE "'A'%";
Select first_name from employess where first_name LIKE 'A%';
Select first_name from employess where first_name LIKE '%A%';
Which error occurs while the program is running and cannot be detected by the PL/SQL compiler?
Syntax error
Runtime error
Both A & B
None of the above
Which of the following returns the current error message text?
SQLERRM
SQLCODE
Both A & B
None of the above
Which of the following keywords will you use to display unique values of the column dept_name ?
SELECT ______ dept_name from COMPANY;
All
distinct
from
name
Total number of rows/records/horizontal arrangement in a table is called:
Degree
Records
Integer
Cardinality
Given a sequence of number below:
50,60,40,70,45,55,30,80,65,35,25,75,85
When creating a binary search tree, what is the height of the tree?
3
4
5
6
Given a binary search tree, insert 27, 15, 63, 99, 70 and 85 (in this order) into the binary search tree. What is the post-order traversal?
5,15,27,34,47,54,63,70,72,75,83,85,88,94,99,101
72,54,34,5,27,15,47,63,70,83,75,88,85,101,94,99
15,27,5,47,34,70,63,54,75,85,99,94,101,88,83,72
15,27,5,47,34,63,54,70,75,85,99,94,101,88,83,72
none of the above
Which one of the following is NOT part of SDLC conceptual model?
Requirement Analysis
Design
Testing
Product Bug
Fill in the blank.
We store all these information into something call _________ which has Tables that includes rows and columns.
API
database
client
JSON
The spiral model has two dimensions namely _____________ and ____________
diagonal, angular
radial, perpendicular
radial, angular
diagonal, perpendicular
Which of the following activities of a Generic Process framework provides a feedback report?
Communication
Planning
Modeling & Construction
Deployment
What is the HTTP status code for Server Error
200
300
400
500
What is the difference between props and state in React?
Props and state are the same thing in React.
Props are used to pass data from a parent component to a child component, while state is used to manage data within a component.
Props are used to manage data within a component, while state is used to pass data from a parent component to a child component.
Props and state are both used to manage data within a component.
Which of the following function is used to change the state of react component?
setState()
state()
setChangeState()
None of the above
