Font size
WorksheetseInfochips
Total questions: 71
Worksheet time: 1hrs 11mins
Enter Your Name
Enter Your Enrolment No
Enter Your Branch(AIML, DS, CSE)
Enter Your Email ID(xxxxxxxxxxx@acropolis.in)
What are the three main programming structures?
Sequence, selection, iteration
Structured, object-oriented, procedural
Java, Python, Visual Basic
Machine, assembly, high-level
Yes
In a Python program , a control structure:
directs the order of execution of the statements in the program
dictates what happens before te program starts and after it terminates
defines program-specific data structures
manages the input and output of control characters
What is the output of the above program ?
Am I here?
Or here ?
Am I here ? Or here ?
Or here ? Or over here ?
If the user inputs : 2<Enter> , what does the following code snippet print ?
Yes
No
May be
Nothing printed
Error
Function range(3) is equivalent to "
range(1,3)
range(0,3)
range(0,3,1)
range(1,3,0)
What is the output?
condition
True
Program has a syntax error.
3 > 2
What is the output?
more than 7
more than 23
spam
7
What is the output?
3
3
7
3
5
7
7
What is the output?
True
NIL
True
NIL
True
NIL
NIL
What is the output?
level 3
level 3
level 1
level 3
level 1
NIL
level 3
level 2
level 1
NIL
An If statement can be executed multiple times
FALSE
TRUE
The ‘else’ statement is optional in Python
TRUE
FALSE
It is possible to execute both the statements under if and else at the same time.
TRUE
FALSE
There can be an else statement without an if statement
FALSE
TRUE
The program generates an error message if the "else" statement is not defined
FALSE
TRUE
Python supports (a) types of loops
What is the output?
Hello world!
Hello world!
Hello world!
Hello world!
Hello world!
......(repeated continuously)
What is the output if the user types "Python"?
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 of the following is a valid data type in MongoDB?
String
Float
Date
All of the options
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
Which MongoDB operation is used to insert a new document into a collection?
db.collection.create()
db.collection.add()
db.collection.insertOne()
db.collection.updateOne()
Which MongoDB update method updates a single document matching the specified criteria
updateOne()
updateMany()
update()
findOneAndUpdate()
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.
Which MongoDB method is used to remove a single document from a collection that matches a specified query?
db.collection.delete()
db.collection.removeOne()
db.collection.deleteOne()
db.collection.remove()
Which module provides a powerful expression language for querying and manipulating an object graph at runtime?
JDBC
Expression Language
ORM
AOP
Which module provides an abstraction layer that supports Object/XML mapping implementations for JAXB, Castor, XMLBeans, JiBX and XStream?
OXM
Transaction
Web
JMS
Which module provides consistent loading of Spring ApplicationContexts and caching of those contexts for testing Spring components with JUnit or TestNG?
AOP
Web
Test
Instrumentation
Which module contains Spring's model-view-controller (MVC) implementation for web applications?
Web-Portlet
Web
Web-Servlet
Web-Struts
Which module provides the MVC implementation to be used in a portlet environment and mirrors the functionality of Web-Servlet module?
Web
Web-Servlet
Web-Portlet
Web-Struts
Which module provides basic web-oriented integration features such as multipart file-upload functionality and the initialization of the IoC container using servlet listeners and a web-oriented application context?
Web-Portlet
Web-Servlet
Web
Web-Struts
Which module builds on the solid base provided by the Core and Beans modules and is a means to access objects in a framework-style manner that is similar to a JNDI registry?
Core
Beans
Context
Expression Language
Which module provides integration layers for popular object-relational mapping APIs, including JPA, JDO, Hibernate, and iBatis?
OXM
ORM
JDBC
JMS
Which module supports programmatic and declarative transaction management for classes that implement special interfaces and for all your POJOs (plain old Java objects)?
Transaction
OXM
ORM
JDBC
Which module contains features for producing and consuming messages?
ORM
OXM
JMS
JDBC
Which Azure Service provides dedicated hardware security modules for cryptographic key management?
Azure Monitor
Azure Dedicated HSM
Azure Bastion
Azure ATP
Which Azure Service provides protection for data in use through hardware-based trusted execution environments?
Azure DDoS Protection
Azure Firewall
Azure Confidential Computing
Azure Defender
Which Azure Service provides unified security management and threat protection for cloud resources?
Azure Active Directory ( Azure AD )
Azure Security Center
Azure Sentinel
Azure Key Vault
Which Azure service provides a web-based interface for no-code machine learning model development?
Azure OpenAI Service
Azure Applied AI Services
Azure Machine Learning Studio
Azure Anomaly Detector
Azure Machine Learning
Azure Cognitive Services
Azure Bot Service
Azure Cognitive Services
Azure Cache for Redis
Azure Database Migration Service
Azure Synapse Analytics
Azure HDInsight
Azure SQL Database
Azure SQL Managed Instance
Azure Database for MySQL
Azure Database for PostegreSQL
What kind of NoSQL database MongoDB is?
Document Oriented
Key Value
Graph
Column Oriented
Which of the following is a valid MongoDB JSON document:
{}
{ "user_id"=1, "user_name"="Joe Sanders", "occupation"=["engineer","writer"] }
{ "user_id":1; "user_name":"Joe Sanders"; "occupation":["engineer","writer"] }
{ "user_id":1, "user_name":"Joe Sanders", "occupation":[ "occupation1":"engineer", "occupation2":"writer" ] }
What does the output x of the following MongoDB aggregation query result into:
db.posts.aggregate( [ { $group: { _id: "$author", x: { $sum: $likes } } } ] )
Average of likes on all the posts of an author, grouped by author
Number of posts by an author
Sum of likes on all the posts by an author, grouped by author
Sum of likes on all the posts by all the authors
Consider that you have the following two documents in the products collection:
{ "_id" : 1, "prices" : [ 60, 100, 200 ] }
{ "_id" : 2, "prices" : [ 20, 90, 150 ] }
What will the following query result into:
db.products.update( { _id: 1, prices: 100 }, { $set: { "prices.$" : 111 } } )
Updates 60 to 100
Updates 100 to 111
Updates 60,100 and 200 to 111
Removes the three elements of the prices array and replaces it only a single element 111
Which of the following aggregation query will sort the posts collection with author key ascending:
db.posts.aggregate([ {$sort:{ author:1 } } ])
db.posts.aggregate([ {$sort:{ author:-1 } } ])
db.posts.aggregate([ {author: {$sort: 1} } ])
You need to first use $group or $project or $match command before $sort in the pipeline
Which of the following commands create an unique index on author field of the posts collection?
db.posts.createIndex({"author":1 }, {"unique": true});
db.posts.createIndex({"author": unique });
db.posts.createIndex({"author": {$unique:1} });
db.posts.createIndexUnique({"author":1 });
In a collection that contains 100 post documents, what does the following command do?
db.posts.find().skip(5).limit(5)
Skip and limit nullify each other. Hence returning the first five documents.
Skips the first five documents and returns the sixth document five times
Skips the first five documents and returns the next five
Limits the first five documents and then return them in reverse order
Consider a collection posts which has fields: id, posttext, post_author, post_timestamp, post_tags etc. Which of the following query retrieves ONLY the key named post_text from the first document retrieved?
db.posts.find({},{_id:0, post_text:1})
db.posts.findOne({post_text:1})
db.posts.finOne({},{post_text:1})
db.posts.findOne({},{_id:0, post_text:1})
A collection and a document in MongoDB is equivalent to which of the SQL concepts respectively?
Table and Row
Table and Column
Column and Row
Database and Table
Which of the following MongoDB query is equivalent to the following SQL query:
UPDATE users SET status = "C" WHERE age > 25
db.users.update( { age: { $gt: 25 } }, { status: "C" })
db.users.update( { age: { $gt: 25 } }, { $set: { status: "C" } })
db.users.update( { age: { $gt: 25 } }, { $set: { status: "C" } }, { multi: true })
db.users.update( { age: { $gt: 25 } }, { status: "C" }, { multi: true })
Which of the following is true about ng-app directive?
ng-app directive defines and links an AngularJS application to HTML
ng-app directive indicates the start of the application.
Both
None
AngularJS is perfect for _______
Create Single Page Applications
Creating a Desktop Application
Create Web Services
None
AngularJS is a _____.
HTML Framework
.Net Framework
JavaScript framework
Oracle Framework
AngularJS is distributed as a _______.
JavaScript file
PHP file
HTML file
Java file
Who developed AngularJS?
Jesse James Garrett
Douglas Crockford
Miško Hevery
Brendan Eich
AngularJS expressions are written inside _____.
{ expression }
[{ expression }]
_expression
{{ expression }}
Which directive can be used to write AngularJS expressions?
ng-expression
ng-bind
ng-statement
ng-bindexpression
An AngularJS module defines an ______.
expression
application
element
None
Which prefix is used with the AngularJS directives?
ng-
ag-
ang-
js-
Which directive initializes an AngularJS application?
ng-app
ng-init
ng-model
ng-application
