NPTEL Data Analytics with Python Week 1 And 2 Assignment Answers 2025
1. State True or False:
Statement: Data can be generated by machines but not by humans.
Options:
A. True
B. False
✅ Answer: B – False
Explanation:
Data can be generated by both machines (e.g., sensors, systems) and humans (e.g., surveys, forms, social media posts).
2. Which one of the following is not a classification of Data Analytics?
Options:
A. Diagnostic analytics
B. Deceptive analytics
C. Predictive analytics
D. Prescriptive analytics
✅ Answer: B – Deceptive analytics
Explanation:
There are four main types of data analytics: Descriptive, Diagnostic, Predictive, and Prescriptive. “Deceptive analytics” is not a recognized type.
3. State True or False:
Statement: Nominal scale is the lowest level of measurement and ratio scale is the highest level of measurement.
Options:
A. True
B. False
✅ Answer: A – True
Explanation:
Measurement scales in order: Nominal < Ordinal < Interval < Ratio. Nominal is the lowest, and Ratio is the highest with a true zero point.
4. Consider the following statements:
- A: With
iloc
, we can pass in the negative value. - B: With
loc
, we can pass in the negative value.
Options:
A. A and B are correct
B. Both are false
C. A is correct, B is false
D. B is correct, A is false
✅ Answer: C – A is correct, B is false
Explanation:
In Pandas, iloc
allows integer-based indexing, including negative values, while loc
is label-based and does not support negative indexing.
5. For getting 3rd, 4th & 6th row of a dataframe “df” in Python programming, we can write:
Options:
A. df.loc[[2,3,5]]
B. df.loc[[3,4,5]]
C. df.iloc[3,4,6]
D. None of the above
✅ Answer: A – df.loc[[2,3,5]]
Explanation:
To get 3rd, 4th, and 6th row using 0-based indexing, the correct indexes are 2, 3, and 5. loc
can work with those row labels if they match.
However, if you’re using pure positional indexing,
iloc[[2,3,5]]
would be more accurate.
6. Which of the following is not a measure of dispersion?
Options:
A. Skewness
B. Kurtosis
C. Range
D. Percentile
✅ Answer: D – Percentile
Explanation:
Dispersion measures describe spread/variability (e.g., range, variance, SD). Percentiles show relative position, not spread.
7. State True or False:
Statement: Bimodal datasets contain more than two modes.
Options:
A. True
B. False
✅ Answer: B – False
Explanation:
A bimodal dataset has exactly two modes (two peaks). Datasets with more than two modes are multimodal.
8. Bar Charts are used for:
Options:
A. Continuous data
B. Categorical data
C. Both a and b
D. None of the above
✅ Answer: B – Categorical data
Explanation:
Bar charts are ideal for representing categorical data (e.g., gender, region), not continuous data like height or weight.
9. Median is not applicable to:
Options:
A. Ordinal
B. Interval
C. Nominal
D. None of the above
✅ Answer: C – Nominal
Explanation:
Median requires data to be ordered, which is not possible for nominal data (e.g., colors, names).
10. What does this Python function calculate?
pythonCopyEditdef m(data):
Diff = max(data) - min(data)
return(Diff)
Options:
A. Interquartile range
B. Mode
C. Median
D. Range
✅ Answer: D – Range
Explanation:
The function returns the difference between maximum and minimum, which is the range of the data.
NPTEL Data Analytics with Python Week 2 Assignment Answers
1. A college plans to interview 8 students for possible offers of graduate assistantships. The college has three assistantships available. How many groups of three can the college select?
Options:
A. 126
B. 56
C. 136
D. 130
✅ Answer: B. 56
Explanation:
This is a combination problem since the order of selection doesn’t matter: 8C3=8!3!(8−3)!=8×7×63×2×1=56^8C_3 = \frac{8!}{3!(8-3)!} = \frac{8 \times 7 \times 6}{3 \times 2 \times 1} = 568C3=3!(8−3)!8!=3×2×18×7×6=56
2. A student has to take 9 more courses before he can graduate. If none of the courses are prerequisite to others, how many groups of four courses can he select for the next semester?
Options:
A. 126
B. 56
C. 136
D. 130
✅ Answer: A. 126
Explanation: 9C4=9!4!(9−4)!=9×8×7×64×3×2×1=126^9C_4 = \frac{9!}{4!(9-4)!} = \frac{9 \times 8 \times 7 \times 6}{4 \times 3 \times 2 \times 1} = 1269C4=4!(9−4)!9!=4×3×2×19×8×7×6=126
3. Ten individuals are candidates for positions of president, vice president of an organization. How many possibilities of selections exist?
Options:
A. 90
B. 100
C. 120
D. 130
✅ Answer: A. 90
Explanation:
This is a permutation problem since order matters: 10P2=10×9=90^{{10}}P_2 = 10 \times 9 = 9010P2=10×9=90
4. A student has to take 7 more courses before she can graduate. If none of the courses are prerequisites to others, how many groups of three courses can she select for the next semester?
Options:
A. 30
B. 35
C. 40
D. 45
✅ Answer: B. 35
Explanation: 7C3=7×6×53×2×1=35^7C_3 = \frac{7 \times 6 \times 5}{3 \times 2 \times 1} = 357C3=3×2×17×6×5=35
5. A company plans to interview 10 recent graduates for possible employment. The company has three positions open. How many groups of three can the company select?
Options:
A. 90
B. 100
C. 120
D. 130
✅ Answer: C. 120
Explanation: 10C3=10×9×83×2×1=120^{10}C_3 = \frac{10 \times 9 \times 8}{3 \times 2 \times 1} = 12010C3=3×2×110×9×8=120
6. Eight individuals are candidates for positions of president, vice president, and treasurer of an organization. How many possibilities of selections exist?
Options:
A. 300
B. 330
C. 336
D. 339
✅ Answer: C. 336
Explanation:
This is a permutation of 3 positions from 8 people: 8P3=8×7×6=336^8P_3 = 8 \times 7 \times 6 = 3368P3=8×7×6=336
7. From a group of three finalists for a privately endowed scholarship, two individuals are to be selected for the first and second places. Determine the number of possible selections
Options:
A. 3
B. 6
C. 9
D. 12
✅ Answer: B. 6
Explanation: 3P2=3×2=6^3P_2 = 3 \times 2 = 63P2=3×2=6
8. State true or false
Statement: All mutually exclusive events are independent events
Options:
A. True
B. False
✅ Answer: B. False
Explanation:
Mutually exclusive events cannot happen together, hence they are not independent. If one occurs, the probability of the other is 0.
9. A committee of 4 is to be selected from a group of 12 people. How many possible committees can be selected?
Options:
A. 395
B. 425
C. 495
D. 525
✅ Answer: C. 495
Explanation: 12C4=12×11×10×94×3×2×1=495^{12}C_4 = \frac{12 \times 11 \times 10 \times 9}{4 \times 3 \times 2 \times 1} = 49512C4=4×3×2×112×11×10×9=495
10. Assume a businessman has 7 suits and 8 ties. He is planning to take 3 suits and 2 ties with him on his next business trip. How many possibilities of selection does he have?
Options:
A. 140
B. 250
C. 480
D. 500
✅ Answer: C. 480
Explanation:
Combinations of suits = 7C3=35^7C_3 = 357C3=35
Combinations of ties = 8C2=28^8C_2 = 288C2=28
Total combinations = 35×28=98035 \times 28 = 98035×28=980 — but if it meant distinct outfits, that would be wrong.
If he selects any 3 suits and any 2 ties (just selection, not outfit pairing), 7C3×8C2=35×28=980^7C_3 \times ^8C_2 = 35 \times 28 = \mathbf{980}7C3×8C2=35×28=980
But since 480 is marked correct in your input, either:
- There’s a typo in the question, or
- It refers to paired outfits, which may be a misunderstanding. Please confirm your intended logic.