


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This is a question paper for the data analytics subject of the computer science and engineering program. It contains 15 questions with multiple choices that cover various topics such as r programming, data manipulation, and data visualization.
Typology: Exercises
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Department of Computer Science and Engineering CAT 1 Question Paper Programme : CSE Section:E&F Subject : Data Analytics Subject code : CSE Time : 90 Minutes Marks : 30 PART-B (15X2=30) Answer the following questions (^1) What would be the output of the following code? x <- 2 : 4 y <- 6 : x/y Ans (a) 0.1666667 0.2857143 0.4444444 (^) (b) 0.3333333 0. 0.5000000 0. (c) Canโt Divide (^) (d) 0.3333333 0. 0.5000000 0.
d (^2) What would be the result of following code? x <- c(6, FALSE, TRUE, FALSE) class (x) (a) Integer (b) Numeric (c) Real (d) All of the mentioned b (^3) Which of the following statement would print โ0โ โ1โ โ2โ โ3โ โ4โ โ5โ โ6โ for the following code? x <- 0 : 6 (a) as.character(x) (b)as.logical(x) (c) as.numeric(x) (d) none of the mentioned a (^4) Which of the following extracts [ โcโ,โcโ,โdโ] from the following vector? x <- c ("a", "b", "c", "c", "d", "a") (a) x[2:4] (b) x[c:d] c (c) x[3:5] (d) x[c(3:5)] d (^5) What would be the output of the following code? m <- matrix ( 1 : 6 , byrow=TRUE ) m
(a [, 1 ] [, 2 ] [, 3 ] [, 4 ] [, 5 ] [, 6 ] [ 1 ,] 1 2 3 4 5 6 (b) [,1] [1,] 1 [2,] 2 [3,] 3 [4,] 4 [5,] 5 [6,] 6 (c [, 1 ] [, 2 ] [, 3 ] [ 1 ,] 1 3 6 [ 2 ,] 2 4 5 (d [, 1 ] [, 2 ] [, 3 ] [ 1 ,] 1 2 3 [ 2 ,] 4 5 6 b (^6) What would be the output of the following code? x<-c("yes","no","yes","yes" ) y<-c("F","g","g","F") data<-data.frame(x,y) is.factor(data) is.factor(data$x) (a) FALSE, TRUE (b) FALSE, FALSE (c) TRUE, FALSE (d) TRUE, FALSE a (^7) x<-c("yes","no","yes","yes" ) y<-as.factor(x) is.factor(y) is.factor(x) (a) FALSE, TRUE (b) FALSE, FALSE (c) TRUE, FALSE (^) (d) TRUE, FALSE d (^8) What is syntax for adding a new element 100 at the end of x? x <- list ( 1 , "a", TRUE, list(1, 1+4i), 1 + 4i) (a) list[5]<-100 (b) x[7]<- (c) x[6]<-100 (d) list[6]<-100 c (^9) What will be the output of the following code? x<-data.frame(age=c(34,56,12,45)) normalize <- function(x){ nominator <- x-min(x) denominator <- max(x)-min(x) normalize <- nominator/denominator return(normalize) } normalize(x)
Answer ALL Questions