[Week 1] NPTEL Data Science for Engineers Assignment Answers 2024

Join Our WhatsApp Group Join Now
Join Us On Telegram Join Now

NPTEL Data Science for Engineers Week 1 Assignment Answers 2024

1. Which of the following variable names are INVALID in R?

  • 1_variable
  • variable_1
  • _variable
  • variable@
Answer :- 

2. The function ls() in R will

  • set a new working directory path
  • list all objects in our working environment
  • display the path to our working directory
  • None of the above
Answer :- 

3. Which of the following command is used to access the value “Shyam”?

  • print(patient_list[3][2])
  • print(patient_list[[3]][1])
  • print(patient_list[[3]][2])
  • print(patient_list[[2]][2])
Answer :- 

4. The output of the code given below is

a1q4

a1q4a
a1q4b
a1q4c
  • Code will throw an error
Answer :- 

5. What is the output of following code?
a1q5

  • double
  • integer
  • list
  • None of the above
Answer :- 

6. State whether the given statement is True or False.
The library reshape2 is based around two key functions named melt and cast.

  • True
  • False
Answer :- 

7. What is the output of following code?
a1q7

  • 6
  • 4
  • 2
  • 8
Answer :- 

8. Choose the correct command to add a column named student_dept to the 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
Answer :- 

9. Choose the correct command to access the element Tamil in the dataframe student_data.

  • student_data[[4]]
  • student_data[[4]][3]
  • student_data[[3]][4]
  • None of the above
Answer :- 

10. The command to check if a value is of numeric data type is ____.

  • typeof()
  • is.numeric()
  • as.numeric()
  • None of the above
Answer :- 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top