NEW
Font size
WorksheetsKFIN_Tech_Screening_Test_Python_101_Jan'24
Total questions: 60
Worksheet time: 3600secs
What is Babel?
A transpiler.
An interpreter
A Compiler
Both Compiler and Transpilar
Props are __________ into other components
Injected
Methods
Both A and B
All of these
Keys are given to a list of elements in react. These keys should be -
Unique in the DOM
Do not requires to be unique
Unique among the siblings only
All of the above
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.
What happens when the following render() method executes?
Error. Cannot use direct JavaScript code in JSX
Error. Should be replaced with a for..loop for correct output
Displays the list of languages in the array
Displays nothing
What are two ways data gets handled in react?
state & props
services & components
state & services
state & component
Which code snippet demonstrates conditional rendering in React using JSX?
return isLogged ? <p>Welcome!</p> : null
{isLogged ? <p>Welcome!</p> : <p>Please log in.</p>}
if (isLogged) {
return <p>Welcome!</p>;
} else {
return <p>Please log in.</p>;
}
{isLogged ? return <p>Welcome!</p> : return <p>Please log in.</p>}
What is an API server
Server that host websites and serve web pages to users' browsers when they request them.
Server that host files and serve files to users when they request them.
Server that host data and serve data to clients when they request them.
Server that host APIs and serve data to clients when they request them.
What method do we use to apply a middleware in express
app.use(middleware)
app.apply(middleware)
app.config(middleware)
app.render(middleware)
______ allow you to generate HTML dynamically based on data from your application.
Template Engines
Routers
Middlewares
Controllers
Which component ends the request cycle provided all business logic are met?
Middleware
Controller
Request Hanlder
None of the options
What process is responsible for organizing data to minimize redundancy and dependency issues?
Reverse engineering
Normalization
Minimization
Dependency Reduction
Fields/Columns are _____ within a table/collection
attributes of data
types of data
records of data
constraints of data
Data stored in a database that represent a thing, person or object is referred to as:
Entity
Entropy
Records
Class
A database is a does one of the following for us:
persist data
organize data efficiently
provides ways for manipulation and retrieval of data
All of the options
How can we create chainable route handlers for a route path in ExpressJS app?
Using app.route()
Using app.router()
Using app.routing()
Using approute()
In ExpressJS, which of these is correct which can accept all HTTP methods?
method app.all(path, callback [, callback ...])
method app.one(path, callback [, callback ...])
method app.many(path, callback [, callback ...])
method app.none(path, callback [, callback ...])
How to store local variables that can be access within the application?
Using app.locals
Using app.storage
Using database
Config file
Where is captured values are populated regarding route parameters?
req.params object
app.locals object
req.data object
None of above
Where is captured values are populated regarding route parameters?
req.params object
app.locals object
req.data object
None of above
MongoDB is a _________ database that provides high performance, high availability, and easy scalability.
Graph
Key value
Document
All of the mentioned
NoSQL databases is used mainly for handling large volumes of ______________ data.
Unstructured
Structured
Semi-structured
All of the mentioned
What is the correct order to create a routing module ?
1.Create express Router Instance.
2.Require express
3.module.exports
4.Create Route Handler function
1324
2134
2143
1234
What is the result of following Program in python3
for i in range(1,4):
print(i)
if(i==2):
continue;
1
1
2
3
error
1
3
Combining Data and Functions into a single unit is called
Abstraction
Inheritance
Encapsulation
Polymorphism
What is it called where child object gets killed if parent object is killed?
Aggregation
Composition
Encapsulation
Association
Which of the following is associated with objects?
State
Behaviour
Identity
All the above
Evaluate the following expression in python:
"dog" < "Dog"
They are the same word
True
False
What is the output of the program above
10
15
18
17
16
What is the value of the variable sum after the code above executes
54
44
64
34
74
What does this program print
2 + 2 = 4
4 + 4 = 8
8 + 8 = 16
16 + 16 = 32
32 + 32 = 64
2 + 2 = 4
2 + 2 = 4
2 + 2 = 4
2 + 2 = 4
2 + 2 = 4
2 + 2 = 4
2 + 4 = 6
2 + 6 = 8
2 + 8 = 10
2 + 10 = 12
2 + 2 = 4
2 + 2 = 4
2 + 2 = 4
2 + 2 = 4
2 + 2 = 4
2 + 4 = 6
2 + 6 = 8
2 + 8 = 10
Write the output of the following code :
import random
for i in range(random.randint(2,2)):
print(i)
0
1
1
2
0
1
2
Generate different number
Write the output of the following code :
import random
print(int(random.random()))
Any random number less than 1 and greater than 0
Always generate 0
Always generate 1
Shows Error
How many types of functions are there in python?
2
4
5
6
print(ord(‘A’)) displays____
65
A
a
97
A block within a block is called ________block.
Nested
Control
Compressed
Called
which function is used to read records from a binary file?
pickle.load(f)
pickle.read()
pickle.open()
pickle.dump(l,f)
What will be the output of the following Python code?
True
False
None
error
Which function is used to write multiple lines in text file?
write()
writelines()
lines()
print()
What will be the output-
f=open('abc.txt','a')
text="xyz"
f.write(text)
f.close()
Writing into the file without erasing old content
Writing into the file by erasing old content
reading from the file without erasing old content
reading from the file by erasing old content
