Assessment submitted.
(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)
X
profpadmat@gmail.com
NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Data Science for Engineers (course)
Click to register
for Certification
exam
Thank you for taking the Week 1 :
Assignment 1.
(https://examform.nptel.ac.in/2025_10/exam_form/dashboard)
If already
registered, click
to check your
Week 1 : Assignment 1
payment status Your last recorded submission was on 2025-07-18, 11:18 Due date: 2025-08-06, 23:59 IST.
IST
1) Which of the following variable names are INVALID in R? 1 point
Course
outline 1_variable
variable_1
About _variable
NPTEL () variable@
How does an 2) The function ls() in R will 1 point
NPTEL
online set a new working directory path
course
list all objects in our working environment
work? ()
display the path to our working directory
Week 1 () None of the above
Data science
for engineers Consider the following code snippet. Based on this, answer questions 3 and 4.
Course
philosophy
and
expectation
(unit?
unit=21&lesso
n=22)
Introduction to
R (unit?
unit=21&lesso 3) Which of the following command is used to access the value “Shyam”? 1 point
n=23)
print(patient_list[3][2])
Introduction to print(patient_list[[3]][1])
Assessment submitted.
R (Continued)
X print(patient_list[[3]][2])
(unit?
unit=21&lesso print(patient_list[[2]][2])
n=24)
4) What does the following R code produce? 1 point
Variables and
datatypes in R
(unit?
unit=21&lesso
n=25)
“apple”
Data frames
“banana”
(unit?
unit=21&lesso “cherry”
n=26) Error
Recasting and
joining of 5) What is the output of following code? 1 point
dataframes
(unit?
unit=21&lesso
n=27)
Arithmetic,Logi
double
cal and Matrix
operations in integer
R (unit? list
unit=21&lesso
None of the above
n=28)
Advanced 6) State whether the given statement is True or False. 1 point
programming The library reshape2 is based around two key functions named melt and cast.
in R :
Functions True
(unit?
False
unit=21&lesso
n=29)
7) What does the following R code return? 1 point
Advanced
Programming
in R :
Functions
(Continued)
(unit?
unit=21&lesso 5, 10, 15, 20
n=30) 15, 20
Control 10, 15, 20
structures Error
(unit?
unit=21&lesso
n=31)
Data
visualization in
R Basic
graphics (unit?
unit=21&lesso 8) What is the output of the following R code? 1 point
Assessment
n=32)submitted.
X
Common
doubts asked
on R
Language
(Week-1)
(unit?
unit=21&lesso
1, 2, 3
n=33)
0, 1, 2
Quiz: Week 1
1, 2, 3, 4
: Assignment
1 Error
(assessment?
name=236)
Create the data frame using the code given below and answer questions 9 and 10.
student_data =
data.frame(student_id=c(1:4),student_name=c(‘Ram’,‘Harish’,‘Pradeep’,‘Rajesh’))
9) Choose the correct command to add a column named student_dept to the 1 point
dataframe student_data.
student_datastudent_dept=c(“Commerce”, “Biology”, “English”, “Tamil”)
student_data[“student_dept”]= c(“Commerce”,“Biology”, “English”,“Tamil”)
student_dept= student_data[c(“Commerce”,“Biology”,“English”,“Tamil”)]
None of the above
10) Choose the correct command to access the element Tamil in the dataframe 1 point
student_data.
student_data[[4]]
student_data[[4]][3]
student_data[[3]][4]
None of the above
11) The command to check if a value is of numeric data type is ______. 1 point
typeof()
is.numeric()
as.numeric()
None of the above
12) What will the following R code return? 1 point
6
5
9
Error
Assessment submitted.
X 13) What is the result of the following R code? 1 point
[1] 8 10 12
[2] 14 16 18
[1] [2] [3]
[1] 8 12 16
[2] 10 14 18
[1] 8 9 10 11 12 13
Error
You may submit any number of times before the due date. The final submission will be
considered for grading.
Submit Answers