NPTEL Data Science for Engineers Assignment 1 Answers 2022

NPTEL Data Science for Engineers Assignment 1 Answers 2022:- All the Answers provided below to help the students as a reference, You must submit your assignment at your own knowledge.

ALSO READ :-
NPTEL Exam Result 2022 | NPTEL Swayam Result Download
NPTEL Registration Steps [July – Dec 2022]
NPTEL Exam Pattern Tips & Top Tricks [2022]

NPTEL Data Science for Engineers Assignment 1 Answers 2022 [July 2022]

1. Choose the variable name(s) that are valid in R.

a. emp_name = “Ram”
b. emp.name = “Ram”
c. empname1 “Ram”
d. 1empname = “Ram”

Answer:- a, b, c

2. The function ls() in R will

a. set a new working directory path
b. list all objects in our working environment
c. display the path to our working directory
d. None of the above

Answer:- b

Answers will be Uploaded Shortly and it will be Notified on Telegram, So JOIN NOW

NPTEL Data Science for Engineers Assignment 1 Answers 2022

3. Consider the following code in R.

NPTEL Data Science for Engineers Assignment 1 Answers 2022
If we supply 4 as an argument to the function find.function, after executing the above code, the result displayed would be 
  • the numbers “1,2,3,4”
  • the numbers “1,4,9,16”
  • the number “4”
  • None of the above
Answer:-b

4. The next statement in R programming is useful

a. for skipping the current iteration of a loop without terminating it
b. for terminating the current iteration of a loop
c. for evaluating the current iteration of a loop without terminating it
d. None of the above

Answer:- a

Create the data frame using the code given below and answer questions 5 and 6
student_data = data.frame(student_id=c(1:4), student_name=c(’Ram’,’Harish’,’Pradeep’,’Rajesh’))

5. Choose the correct command to add a column named student_dept to the dataframe student_data

a. student_data$student_dept=c(“Commerce”,”Biology”,”English”,”Tamil”)
b. student_data[“student_dept”]= c(“Commerce”,”Biology”,”English”,”Tamil”)
c. student_dept= student_data[c(“Commerce”,”Biology”,”English”,”Tamil”)]
d. None of the above

Answer:- b

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

a. student_data[[4]]
b. student_data[[4]][3]
c. student_data[[3]][4]
d. None of the above

Answer:- c

👇For Week 02 Assignment Answers👇

NPTEL Data Science for Engineers Assignment 1 Answers 2022

7. State whether the given statement is True or False.

The library reshape2 is based around two key functions named melt and cast.

a. True
b. False

Answer:- a

8. Consider the following code.

NPTEL Data Science for Engineers Assignment 1 Answers 2022
If a room temperature of 20℃ is input to the above code, choose the output displayed 
  • “The room is cold. Please turn the heater on!”
  • “The room is warm” “Enjoy the stay!”
  • “The room is hot” “Please turn the air conditioning on!”
  • None of the above
Answer:- b

9. Table 1 provides the scores of the students in three subjects. Create a data frame called students_scores out of Table 1. Which of the following options gives Table 2 as an output?

Answer:- a

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

Answer:- b

For More NPTEL Answers:- CLICK HERE

Join Our Telegram:- CLICK HERE

What is Data Science for Engineers?

Data Science for Engineers is a fun-filled course where Domain Certification helps learners to gain expertise in a specific Area/Domain. This can be helpful for learners who wish to work in a particular area as part of their job or research or for those appearing for some competitive exam or becoming job-ready or specialising in an area of study.  Every domain will comprise Core courses and Elective courses. Once a learner completes the requisite courses per the mentioned criteria, you will receive a Domain Certificate showcasing your scores and the domain of expertise.

CRITERIA TO GET A CERTIFICATE

Average assignment score = 25% of the average of best 6 assignments out of the total 8 assignments given in the course.
Exam score = 75% of the proctored certification exam score out of 100

Final score = Average assignment score + Exam score

YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF THE AVERAGE ASSIGNMENT SCORE >=10/25 AND EXAM SCORE >= 30/75. If one of the 2 criteria is not met, you will not get the certificate even if the Final score >= 40/100.

COURSE NAMEANSWER
NPTEL Data Science for Engineers Assignment 1 AnswersClick Here
NPTEL Data Science for Engineers Assignment 2 Answers Click Here
NPTEL Data Science for Engineers Assignment 3 Answers Click Here
NPTEL Data Science for Engineers Assignment 4 Answers NA
NPTEL Data Science for Engineers Assignment 5 Answers NA
NPTEL Data Science for Engineers Assignment 6 Answers NA
NPTEL Data Science for Engineers Assignment 7 Answers NA
NPTEL Data Science for Engineers Assignment 8 Answers NA

NPTEL Data Science for Engineers Assignment 1 Answers 2022 [Jan 2022]

Q1. The function “ls ()” in R will 

(A) set a new working directory path 
(B) list all objects in our working environment 
(C) display the path to our working directory 
(D) list all files in our working directory

Ans:- (D) list all files in our working directory

Q2. Consider the following code:

NPTEL Data Science for Engineers Assignment 1 Answers 2022

If a room temperature of 20 degree Celsius is input to the above code, choose the output displayed:

(A) “The room is chilly. Please turn the heater on!”
(B) “The room is warm” “Enjoy the stay!” 
(C) “The room is hot” “Please turn the air conditioning on!” 
(D) None of the above

Ans:- (B) “The room is warm” “Enjoy the stay!” 

Q3. Consider the code below to create a dataframe city_data:

NPTEL Data Science for Engineers Assignment 1 Answers 2022

Choose the correct answer based on the output expected on running the below code.

NPTEL Data Science for Engineers Assignment 1 Answers 2022

(A) In the column weather in dataframe city_data, “Rain” is replaced by “Snowy” 
(B) In the column name in dataframe city_data, “City C” is replaced by “Snowy” 
(C) No change occurs to the entries in the dataframe city_data 
(D) The code raises an error

Ans:- (A) In the column weather in dataframe city_data, “Rain” is replaced by “Snowy” 

Q4. Consider the code given below.

NPTEL Data Science for Engineers Assignment 1 Answers 2022

Choose the correct command to access the variable “Cloudy” 

(A) city_weather[[4]][2] 
(B) city_weather[[5]] 
(C) city_weather[[2]][2] 
(D) None of the above

Ans:- (A) city_weather[[4]][2] 

Q5. Consider the following code.

A = matrix(c(1:42), nrow = 6, ncol = 7, byrow = T)
B = A[-2,]

Based on the output of the above code, choose the correct options from the following 

(A) B is a matrix consisting of only elements of the second row of matrix A 
(B) B is a matrix consisting of same elements as that of A 
(C) The code raises an error 
(D) B is a matrix consisting of all elements of A excluding the second row

Ans:- (D) B is a matrix consisting of all elements of A excluding the second row

Q6. The parameter “collapse” in the function paste() 

(A) adjusts the display of the string to left, right or center 
(B) add space in between two strings 
(C) eliminates the space in between two strings 
(D) eliminates the space within two words in a string

Ans:- (B) add space in between two strings 

Q7. Consider the following code in R.

NPTEL Data Science for Engineers Assignment 1 Answers 2022

If we supply 4 as an argument to the function  find.function, after executing the above code, the result displayed would be

(A) the numbers “1,2,3,4” 
(B) the numbers “1,4,9,16” 
(C) the number “4” 
(D) None of the above

Ans:- (B) the numbers “1,4,9,16” 

Q8. The operator %in% is used for 

(A) multiplication of a matrix with its transpose 
(B) generating a sequence of numbers in a vector 
(C) identifying if an element belongs to a vector 
(D) none of the above

Ans:- (C) identifying if an element belongs to a vector 

Q9. The output of compiling and executing the following code in R would be

NPTEL Data Science for Engineers Assignment 1 Answers 2022

(A) The term “Green” “apple” printed 5 times. 
(B) The term “Green apple” printed 3 times. 
(C) The term “Green” printed 4 times. 
(D) The term “Green” “apple” printed 4 times.

Ans:- (D) The term “Green” “apple” printed 4 times.

Q10. The “next” statement in R programming is useful 

(A) for skipping the current iteration of a loop without terminating it. 
(B) for terminating the current iteration of a loop. 
(C) for evaluating the current iteration of a loop without terminating it. 
(D) none of the above

Ans:- (A) for skipping the current iteration of a loop without terminating it. 

Disclaimer:- We do not claim 100% surety of solutions, these solutions are based on our sole expertise, and by using posting these answers we are simply looking to help students as a reference, so we urge do your assignment on your own.

For More NPTEL Answers:- CLICK HERE

Join Our Telegram:- CLICK HERE

NPTEL Data Science for Engineers Assignment 1 Answers 2022:- All the Answers provided below to help the students as a reference, You must submit your assignment at your own knowledge