Nptel Study
Nptel Study
Week 2 : Assignment 2
The due date for submitting this assignment has passed.
Due on 2025-02-05, 23:59 IST.
{
"_id":ObjectId("615243d88f0ae43f255874c1"),
"count": 300,
"department": "the"
}
Which MongoDB query would you use to retrieve all words with count in descending order ?
db.words.find().sort({ count: -1 })
db.words.find().sort({ count: 1 })
db.words.find().order_by("count", DESCENDING}
db.words.find().sort({ descending: 1 })
Yes, the answer is correct.
Score: 1
Accepted Answers:
db.words.find().sort({ count: -1 })
1 point
Which of the following are the components of a graph ?
Vertices
Edges
Unique Identifier/ID
All of the Above
Yes, the answer is correct.
Score: 1
Accepted Answers:
All of the Above
1 point
Which of the following is true regarding the situation depicted in the graph below
Data Collection > Ground Truth Extraction > Feature Generation > Supervised Learning > Result via
RESTful API
Feature Generation > Data Collection > Supervised Learning > Ground Truth Extraction > Result via
RESTful API
Ground Truth Extraction > Data Collection > Supervised Learning > Feature Generation > Result via
RESTful API
Data Collection > Feature Generation > Ground Truth Extraction > Supervised Learning > Result via
RESTful API
Yes, the answer is correct.
Score: 1
Accepted Answers:
Data Collection > Ground Truth Extraction > Feature Generation > Supervised Learning > Result via
RESTful API
1 point
Which of the following is/are correct statements in context of Web of Trust Score?
Web of Trust score outputs the reputation of an input website
Domain Age can be used as a feature for a Web of Trust score
Domain Owner can be used a feature for a Web of Trust score
None of the Above
Yes, the answer is correct.
Score: 1
Accepted Answers:
Web of Trust score outputs the reputation of an input website
Domain Age can be used as a feature for a Web of Trust score
Domain Owner can be used a feature for a Web of Trust score
1 point
“Shantanu never likes people taking his photo because he doesn’t want it to be posted online”. According
to Westin’s 3 Categories, Shantanu is a :
Fundamentalist
Pragmatist
Unconcerned
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
Fundamentalist
1 point
"Geeta browses all social media websites on her laptop casually, but always opens her banking website in
incognito for checking her balance” According to Westin’s 3 Categories, Geeta is a :
Fundamentalist
Pragmatist
Unconcerned
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
Pragmatist
1 point
According to Westin’s 3 Categories, the lowest percentage of US citizens fall into the category of (as
discussed in the lecture):
Fundamentalist
Pragmatist
Unconcerned
No, the answer is incorrect.
Score: 0
Accepted Answers:
Unconcerned
1 point
According to Westin’s 3 Categories, the highest percentage of US citizens fall into the category of (as
discussed in the lecture) :
Fundamentalist
Pragmatist
Unconcerned
Yes, the answer is correct.
Score: 1
Accepted Answers:
Pragmatist
1 point
Which of the following can be used in authentication for the Twitter API ?
Bearer Token
Client ID
Client Secret
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
Bearer Token
Client ID
Client Secret
1 point
Which of the following can be achieved using Twitter API ?
Retrieving reverse chronological home timeline
Retrieving user Tweet timeline
Retrieving user mention timeline
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
Retrieving reverse chronological home timeline
Retrieving user Tweet timeline
Retrieving user mention timeline
1 point
Which of the following is the correct syntax for creating a tweets table with the specified attributes?
CREATE TABLE (
tweet_id VARCHAR(50) NOT NULL,
text VARCHAR(500) NOT NULL,
PRIMARY KEY (tweet_id),
TABLE NAME(tweets)
);
1 point
Consider a table named “users” containing user profiles from Twitter, which of the following attributes can
be used as a primary key in the table :
Full Name of the User
User ID of the User
No. of Followers of the User
No. of Tweets by the User
Yes, the answer is correct.
Score: 1
Accepted Answers:
User ID of the User
Read through the report “Privacy in India: Attitudes and Awareness V 2.0”
at https://cdn.iiit.ac.in/cdn/precog.iiit.ac.in/research/privacyindia/PI_2012_Complete_Report.pdf And
answer the following questions [11-12] :
1 point
Which of the following method(s) were used for gathering information across India in the report above ?
Surveys
Focus Group Discussions
Interviews
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
Surveys
Focus Group Discussions
Interviews
1 point
Which of the following methods resulted in the largest number of respondents across India ?
Surveys
Focus Group Discussions
Interviews
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
Surveys
1 point
A table in SQL is called a ______ in MongoDB.
Database
Index
Document
Collection
Yes, the answer is correct.
Score: 1
Accepted Answers:
Collection
1 point
A row in SQL is called a ______ in MongoDB.
Collection
Field
Index
Document
Yes, the answer is correct.
Score: 1
Accepted Answers:
Document
1 point
Which of the following can be used to create a new database called “project” and create a collection
named “users” inside it in MongoDB ?
1. use project;
2. db.users.insert({});
1. use project;
2. db.users.insert();
1. create_db project;
2. db.users.insert({});
1. create project;
2. db.users.insert();
Yes, the answer is correct.
Score: 1
Accepted Answers:
1. use project;
2. db.users.insert({});
Week 4 : Assignment 4
The due date for submitting this assignment has passed.
Due on 2025-02-19, 23:59 IST.
import numpy as np
a = np.array([range(i,i+3) for i in [1,2,3]])
print(a)
[[1 2 3]
[2 3 4]
[3 4 5]]
[[1 2 3]
[1 2 3]
[1 2 3]]
[[1 2 3]
[4 5 6]
[7 8 9]]
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
[[1 2 3]
[2 3 4]
[3 4 5]]
1 point
Which of the following codes can be used to make a NumPy array of 10 random numbers?
import numpy as np
import random
l = []
for i in range(10):
l.append(random.random())
zeros_array = np.array(l)
print(zeros_array)
import numpy as np
random_array = np.random.rand(10)
import numpy as np
random_array = np.random.random(10)
None of the above
Partially Correct.
Score: 0.67
Accepted Answers:
import numpy as np
import random
l = []
for i in range(10):
l.append(random.random())
zeros_array = np.array(l)
print(zeros_array)
import numpy as np
random_array = np.random.rand(10)
import numpy as np
random_array = np.random.random(10)
1 point
Which of the following NumPy functions can be used to generate an NxN diagonal matrix ?
np.eye(5)
np.diagonal(np.eye(5))
np.diagonal(5)
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
np.eye(5)
1 point
Which of the following Python code can be used to read a CSV file using Pandas
import pandas as pd
data = pd.read_excel('file.csv')
import pandas as pd
data = pandas.readcsv('file.csv')
import pandas as pd
data = pd.read_csv('file.csv')
1 point
Consider the below structure of a dataframe.
Which of the following Python snippets can be used to plot a histogram of the amount column ?
Assume df is defined as the above dataframe with 100 rows.
df['amount'].plot.hist()
df[df.columns[4]].plot.hist()
import matplotlib.pyplot as plt
plt.hist(df['amount'])
plt.xlabel('Amount')
plt.ylabel('Frequency')
plt.title('Histogram of Amount')
plt.show()
None of the Above
Partially Correct.
Score: 0.67
Accepted Answers:
df['amount'].plot.hist()
df[df.columns[4]].plot.hist()
import matplotlib.pyplot as plt
plt.hist(df['amount'])
plt.xlabel('Amount')
plt.ylabel('Frequency')
plt.title('Histogram of Amount')
plt.show()
1 point
What is the output of the following code ?
pd.Series(['A', 'B', 'C'], index=[1, 2, 3])
1 A
2 B
3 C
A 1
B 2
C 3
A B
C 1
2 3
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
1 A
2 B
3 C
1 point
Select the correct option for plotting the below function using matplotlib
plt.plot(np.cos(x))
plt.show()
plt.scatter(x, np.sin(x))
plt.show()
plt.scatter(np.cos(x), x)
plt.show()
Week 5 : Assignment 5
The due date for submitting this assignment has passed.
Due on 2025-02-26, 23:59 IST.
While browsing a social media website, you come across the post shown above. According to the lecture,
the post falls under :
Work From Home Scam
Hashtag Hijacking
Compromised Account
None of the above
No, the answer is incorrect.
Score: 0
Accepted Answers:
Work From Home Scam
1 point
A group of hackers decide to target the Managing Director of a Company with the intention of stealing
his/her credit card details by sending suspicious emails. As discussed in the lecture,this is called ______ .
Clickbaiting
Whaling
Account Compromise
None of the above
No, the answer is incorrect.
Score: 0
Accepted Answers:
Whaling
1 point
The above image is an example of ______ .
Hashtag Hijacking
Compromised Account
Fake Customer Service Accounts
None of the above
No, the answer is incorrect.
Score: 0
Accepted Answers:
Fake Customer Service Accounts
1 point
As discussed in the lecture, which of the following helps in improving the Pagerank of a website (say,
abc.com) on search engines ?
Reputed websites creating reciprocal links with abc.com
abc.com creating unidirectional links to many websites
Number of links on abc.com’s homepage
None of the above
No, the answer is incorrect.
Score: 0
Accepted Answers:
Reputed websites creating reciprocal links with abc.com
1 point
Spamming the index of search engines is called
Spamdexing
Spamexing
Spamming
None of the above
No, the answer is incorrect.
Score: 0
Accepted Answers:
Spamdexing
Spamexing
1 point
Abhishek and Suresh are college batchmates. Abhishek sees Suresh’s profile on Instagram and follows
him. Suresh after seeing this notification, feels compelled to follow back Abhishek. This phenomenon is
called ______ .
Spamming
Reciprocity
Link farming
All of the above
No, the answer is incorrect.
Score: 0
Accepted Answers:
Reciprocity
1 point
Consider three accounts on Twitter:
Consider, all of them tweeted about #BLRrains expressing their happiness experiencing rain.
According to the lecture, consider the indegree of these accounts and select which of the following
accounts are likely to rank higher while searching for #BLRrains on Twitter.
Anushka
Ramesh
Himanshu
No, the answer is incorrect.
Score: 0
Accepted Answers:
Ramesh
1 point
Which of the following is/are the most widely used formats to represent node-edge graphs on computers
?
Adjacency Matrix
CSV
GraphML
None of the above
No, the answer is incorrect.
Score: 0
Accepted Answers:
Adjacency Matrix
CSV
GraphML
1 point
Consider the above image (Figure 2), and select the correct adjacency matrix representation of the above
shown undirected graph.
A
B
C
D
No, the answer is incorrect.
Score: 0
Accepted Answers:
D
1 point
An NxN adjacency matrix implies there are ______ nodes in the graph.
N/2
N-1
2N-1
None of the above
No, the answer is incorrect.
Score: 0
Accepted Answers:
None of the above
1 point
Observe the graph below (Figure 3).
Consider each node to be an account on Instagram in the graph above (Figure 4). Which of the above
nodes is/are the most influential ?
Node 1
Node 2
Node 4
Node 5
No, the answer is incorrect.
Score: 0
Accepted Answers:
Node 4
1 point
Which of the following is/are graph centrality measures?
Node degree
Betweenness centrality
Closeness centrality
None of the above
No, the answer is incorrect.
Score: 0
Accepted Answers:
Node degree
Betweenness centrality
Closeness centrality
Week 7 : Assignment 7
The due date for submitting this assignment has passed.
Due on 2025-03-12, 23:59 IST.
True
False
Yes, the answer is correct.
Score: 1
Accepted Answers:
True
Observe the image below and answer the following questions [4-5] :
1 point
Which of the following nudge has been shown in the picture above ?
Sentiment Nudge
Timer Nudge
Picture Nudge
None of the above
No, the answer is incorrect.
Score: 0
Accepted Answers:
Picture Nudge
1 point
Select the utility of the above type of nudge :
Making sure that you are sharing content with the intended audience/people.
Giving you the opportunity to cancel your post during a certain timeframe.
Making sure your posts are not perceived as negative by other users.
None of the above
No, the answer is incorrect.
Score: 0
Accepted Answers:
Making sure that you are sharing content with the intended audience/people.
1 point
As discussed in the lecture, which of the following is/are not a social media nudge?
Picture Nudge
Timer Nudge
Voice Nudge
Video Nudge
Yes, the answer is correct.
Score: 1
Accepted Answers:
Voice Nudge
Video Nudge
1 point
Which of the following statements is/are correct about nudges ?
Interventions help users make better decisions about posting on social media.
The primary aim of nudges is to reduce user generated content on social media.
Nudges help individuals avoid regrettable online disclosures.
All of the above
No, the answer is incorrect.
Score: 0
Accepted Answers:
Interventions help users make better decisions about posting on social media.
Nudges help individuals avoid regrettable online disclosures.
1 point
Hemant wanted to steal data from a rival business by going to their office and transferring the required
files by connecting a USB Flash Drive to the target computer. This type of attack is called ________.
Physical Attack
Semantic Attack
Syntactic Attack
All of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
Physical Attack
1 point
Denial of Service Attacks and Buffer Overflow Attacks fall under :
Physical Attacks
Semantic Attacks
Syntactic Attacks
None of the above
No, the answer is incorrect.
Score: 0
Accepted Answers:
Syntactic Attacks
1 point
Shivani, in order to steal login credentials from Anisha, sends an email to her with the subject “Check your
NPTEL Certification Exam Results Here !” which directs Anisha towards a login form with a website
domain not associated with NPTEL. This is a type of _______ attack.
Syntactic
Semantic
Physical
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
Semantic
1 point
Himesh, a college student, gets a malicious SMS from an unidentified source saying “Your Bank Account
has been suspended : Click here to re-activate your account”. This example most closely resembles :
Whaling
Vishing
Smsishing
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
Smsishing
1 point
Consider the following code snippet :
apple
orange
yourself
most
Yes, the answer is correct.
Score: 1
Accepted Answers:
apple
orange
1 point
Consider the below code snippet, consider the variable token holds 1000+ words extracted from a text
corpus.
for i in tokens:
if i not in L:
L[i] = 1
else:
L[i] += 1
print(l)
from collections import Counter
print(Counter(tokens))
Counter(tokens).count()
None of the above
Partially Correct.
Score: 0.5
Accepted Answers:
L = {}
for i in tokens:
if i not in L:
L[i] = 1
else:
L[i] += 1
print(l)
from collections import Counter
print(Counter(tokens))
Week 8 : Assignment 8
The due date for submitting this assignment has passed.
Due on 2025-03-19, 23:59 IST.
The above X(formerly Twitter) profile helps in profile linking through self-identification.
True
False
Yes, the answer is correct.
Score: 1
Accepted Answers:
True
1 point
“If a whisper does not get attention shortly after posting, it is unlikely to get attention later.” This statement
is :
True
False
Yes, the answer is correct.
Score: 1
Accepted Answers:
True
Observe the table given below and answer the following questions [11-13]
1 point
For the same number of Nodes/Users on Whisper, Facebook and Twitter, users on Whisper create more
connections/edges than on Facebook/Twitter.
True
False
Yes, the answer is correct.
Score: 1
Accepted Answers:
True
1 point
Users on Whisper tend to create more close-knit groups than on Facebook/Twitter.
True
False
Yes, the answer is correct.
Score: 1
Accepted Answers:
False
1 point
Assortativity Coefficient being closer to zero implies the graph is more random than “small world”
True
False
Yes, the answer is correct.
Score: 1
Accepted Answers:
True
1 point
The measure of how close a graph is to complete, with 0 indicating an incomplete and 1 indicating a
complete graph is called _________.
Average Degree
Clustering Coefficient
Graph Density
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
Graph Density
1 point
Consider the above Degree Distribution graph generated in Gephi. Which of the following statements
is/are correct about this ?
The average degree of the graph is greater than 70
The average degree of the graph is lesser than 50
The average degree of the graph is 125
The average degree of the graph is less than 10
Yes, the answer is correct.
Score: 1
Accepted Answers:
The average degree of the graph is lesser than 50
Week 9 : Assignment 9
The due date for submitting this assignment has passed.
Due on 2025-03-26, 23:59 IST.
50% of the users post tips/dones in intervals of less than 500 hours on average. This statement is :
True
False
Yes, the answer is correct.
Score: 1
Accepted Answers:
True
1 point
What is the difference between Pearson and Spearman rank correlation?
Hint: https://en.wikipedia.org/wiki/Pearson_correlation_coefficient
Pearson correlation assesses linear relationships, while Spearman correlation evaluates monotonic
relationships.
Spearman correlation is always between -1 and 1, while Pearson correlation can have values outside this
range.
Spearman correlation is calculated using a formula involving the sum of squared differences, whereas
Pearson correlation is based on the product of z-scores.
All of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
Pearson correlation assesses linear relationships, while Spearman correlation evaluates monotonic
relationships.
1 point
Which plot is shown in the below figure (Figure 4) ?
Scatter Plot
Bar Chart
Bubble Plot
Histogram
Yes, the answer is correct.
Score: 1
Accepted Answers:
Bubble Plot
1 point
Which of the following charts can be generated using highcharts ?
Bar Chart
Line Chart
Scatter Plot
Bubble Chart
Yes, the answer is correct.
Score: 1
Accepted Answers:
Bar Chart
Line Chart
Scatter Plot
Bubble Chart
Common Information for Q11-14:
To import highcharts into Python version >=3.10 use the following code:
Line 6
Line 17
Line 19
Line 21
No, the answer is incorrect.
Score: 0
Accepted Answers:
Line 21
1 point
Which of the following is the correct syntax for labeling the legend for some given data in a scatter plot
using Highcharts ?
chart.add_data_set(data1, 'scatter', name = 'label_name')
chart.add_data_set(data1, 'scatter', 'label_name')
chart.add_data_set(data1, 'scatter', label = 'label_name')
None of the above
Partially Correct.
Score: 0.5
Accepted Answers:
chart.add_data_set(data1, 'scatter', name = 'label_name')
chart.add_data_set(data1, 'scatter', 'label_name')
Week 10 : Assignment 10
The due date for submitting this assignment has passed.
Due on 2025-04-02, 23:59 IST.
“Majority of the users on each of the above mentioned platforms provide home location information at the
street level.” This statement is:
True
False
Yes, the answer is correct.
Score: 1
Accepted Answers:
False
1 point
Refer to the figure below (Figure 2) and answer the following question :
The distance between inferred and declared user home cities on Twitter is less than 40 km for ____ of
users.
20 %
40 %
80 %
None
Yes, the answer is correct.
Score: 1
Accepted Answers:
20 %
Please go through the following paper, “On the dynamics of username change behavior on
Twitter” https://cdn.iiit.ac.in/cdn/precog.iiit.ac.in/Publications_files/04-Jain.pdf and answer the following
questions from [Q6-Q10]
1 point
From the following figure (Figure 3), what is the correct inference?
80% of users rarely change usernames and 20% change user names frequently.
20% of users frequently change usernames and 80% change usernames rarely.
The percentage of users attributed to the change of usernames follows a Pareto Distribution.
The percentage of users attributed to the change of usernames does not follow a Pareto Distribution.
Partially Correct.
Score: 0.34
Accepted Answers:
80% of users rarely change usernames and 20% change user names frequently.
20% of users frequently change usernames and 80% change usernames rarely.
The percentage of users attributed to the change of usernames follows a Pareto Distribution.
1 point
Which of the following method(s) were used in the paper for measuring the similarity between two
consecutive usernames ?
Cosine Similarity
Longest Common Subsequence
Longest Common Substring
All of the Above
No, the answer is incorrect.
Score: 0
Accepted Answers:
Longest Common Subsequence
1 point
Observe the figure below (Figure 4) about the additions or deletions of characters to usernames of several
users on Twitter while changing their usernames and select the correct option(s) :
Most users added or deleted characters either from the start or end of their username.
Most users deleted characters at the end of their usernames.
Most users added characters to the middle of their usernames.
None of the Above.
Partially Correct.
Score: 0.5
Accepted Answers:
Most users added or deleted characters either from the start or end of their username.
Most users deleted characters at the end of their usernames.
1 point
Which of the following statements is/are true ?
Changing usernames rapidly in a short period of time is called Space Gain.
Actively using common usernames like “@happy” or “@smile” is called Username Squatting.
Inactive users preventing others from using that specific username is called Username Squatting.
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
Inactive users preventing others from using that specific username is called Username Squatting.
1 point
Refer to the figure below (Figure 5) about a partner account promoting another in a tweet and answer the
following question:
Which of the following phenomena is shown in the above figure as discussed in the paper ?
Username Squatting
Obscured Username Promotion
Adjust to Events
Space Gain
Yes, the answer is correct.
Score: 1
Accepted Answers:
Obscured Username Promotion
Please go through the following paper, “Boston Marathon Analyzing Fake Content on
Twitter” https://cdn.iiit.ac.in/cdn/precog.iiit.ac.in/Publications_files/ecrs2013_ag_hl_pk.pdf and answer the
following questions from [Q11-Q15]
1 point
Which of the following statements is true about Boston blasts?
Twin blasts occurred during the Boston Marathon on April 15th, 2013 at 18:50 GMT
Twin blasts occurred during the Boston Marathon on April 15th, 2009 at 18:50 GMT
Four people were killed and 264 were injured in the incident
All of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
Twin blasts occurred during the Boston Marathon on April 15th, 2013 at 18:50 GMT
1 point
What does the following figure depict (Figure 6) ?
The figure shows the temporal distribution of tweets after the Boston blast
The figure shows the spatial distribution of tweets after the Boston blast
Both (a) and (b)
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
The figure shows the temporal distribution of tweets after the Boston blast
Refer to the table below (Table 1) about some parameters of Aditya’s account and answer the following
questions [Q13-15]
1 point
Calculate the GlobalEngagement for Aditya.
stopwords = ["i", "me", "my", "myself", "we", "our", "ours", "ourselves", "you", "your", "yours", "yourself",
"yourselves", "he", "him", "his", "himself", "she", "her", "hers", "herself", "it", "its", "had", "having", "do",
"does", "did", "doing", “mango”, "a", "an", "the", "and", "but", "if", "or", "because", "as", "until", "while",
"of", "at", "by", "for", "with", "about", "against", "between", "into",”now"]
because, against, mango, yourself
mango, now
mango
All the words in the list are stopwords
No, the answer is incorrect.
Score: 0
Accepted Answers:
mango
1 point
A sentiment analysis study analyzes a text passage for valence and arousal values. On a scale of -1 to 1,
the valence and arousal score is 0.80 and 0.90. What do these values suggest about the emotional
characteristics of the text?
Negative sentiment, low emotional intensity
Positive sentiment, High emotional intensity
Negative sentiment, high emotional intensity
Positive sentiment, low emotional intensity
No, the answer is incorrect.
Score: 0
Accepted Answers:
Positive sentiment, High emotional intensity