DATA PROGRAMMING (R AND PYTHON)
EXAM 2024/2025
Q. 1. Which programming language has influence on R programming?
A. Q language
B. R language
C. S language
D. T language - Precise Answer ✔✔C
Q.2. Does a programmer need to compile R programming code before running it?
A. True
B. False - Precise Answer ✔✔B
Q.3. Which of the following vector will be generated by using rep (2,3)?
A. 2 2 2
B. 3 3
C. 1 1
D. 1 1 1 - Precise Answer ✔✔A
Q.4. You want to generate a vector 1 3 5 7 9. Which of the following function will generate this vector?
A. rep (1, 10)
B. seq (from = 1, to = 10, by =2)
C. seq (from = 3, to = 10, by =2)
D. seq (from =1, to = 10, by =1) - Precise Answer ✔✔B
Q.5. Which character is used for commenting a line in R programming?
A. #
, B. ;
C. :
D. "" - Precise Answer ✔✔A
Q.6. What is the value of this logical expression: !(5<3)&(5>3)
A. TRUE
B. FALSE
C. Both A and B
D. None - Precise Answer ✔✔A
Q.7. Which of the following is "atomic" structure?
A. Vector
B. List
C. Both A and B
D. None - Precise Answer ✔✔A
Q.8. Which of the following is Correct and will not result in an error?
A. x <-seq(1,100,1);dim(x) <- c(10,10)
B. x <-seq(1,100,1);dim(x) <-c(10,11)
C. x <-seq(1,100,1); dim(x) <- c(9,10)
D. None of the above. - Precise Answer ✔✔A
Q.9. Which of the following code will provide element-wise matrix multiplication for two matrix A and B?
A. A*B
B. A-B
C. A%*%B
D. A+B - Precise Answer ✔✔A
Q10. Which of the following code will provide matrix multiplication for two matrix A and B?
EXAM 2024/2025
Q. 1. Which programming language has influence on R programming?
A. Q language
B. R language
C. S language
D. T language - Precise Answer ✔✔C
Q.2. Does a programmer need to compile R programming code before running it?
A. True
B. False - Precise Answer ✔✔B
Q.3. Which of the following vector will be generated by using rep (2,3)?
A. 2 2 2
B. 3 3
C. 1 1
D. 1 1 1 - Precise Answer ✔✔A
Q.4. You want to generate a vector 1 3 5 7 9. Which of the following function will generate this vector?
A. rep (1, 10)
B. seq (from = 1, to = 10, by =2)
C. seq (from = 3, to = 10, by =2)
D. seq (from =1, to = 10, by =1) - Precise Answer ✔✔B
Q.5. Which character is used for commenting a line in R programming?
A. #
, B. ;
C. :
D. "" - Precise Answer ✔✔A
Q.6. What is the value of this logical expression: !(5<3)&(5>3)
A. TRUE
B. FALSE
C. Both A and B
D. None - Precise Answer ✔✔A
Q.7. Which of the following is "atomic" structure?
A. Vector
B. List
C. Both A and B
D. None - Precise Answer ✔✔A
Q.8. Which of the following is Correct and will not result in an error?
A. x <-seq(1,100,1);dim(x) <- c(10,10)
B. x <-seq(1,100,1);dim(x) <-c(10,11)
C. x <-seq(1,100,1); dim(x) <- c(9,10)
D. None of the above. - Precise Answer ✔✔A
Q.9. Which of the following code will provide element-wise matrix multiplication for two matrix A and B?
A. A*B
B. A-B
C. A%*%B
D. A+B - Precise Answer ✔✔A
Q10. Which of the following code will provide matrix multiplication for two matrix A and B?