



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
DATA PROGRAMMING (R AND PYTHON) EXAM 2024/2025
Typology: Exams
1 / 7
This page cannot be seen from the preview
Don't miss anything!




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. #
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. AB 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?
A. bind two or more matrices or vectors by keeping then side by side. B. binds two or more matrices or vectors by adding rows of next matrix at the bottom of the previous matrix. C. Both A and B D. None of the above - Precise Answer โโA Final Quiz (Practice guide) - Python programming Q 1. Which programming language uses indentation for creating a code block for loops? A. Python programming B. R programming C. Both A and B D. None of the above - Precise Answer โโA Q 2. Is Python programming an open source programming language? A. True B. False - Precise Answer โโA Q 3. In Python programming, all data types are objects? A. True B. False - Precise Answer โโA Q 4. Python programming is? A. Dynamically typed language B. Statically typed language C. Both A and B D. None of the above - Precise Answer โโA Q 5. In Python programming, which of the following function is used to get the type of an object?
A. type() B. mode() C. Both A and B D. None - Precise Answer โโA Q 6. What is the output of the following lines of code in Python programming? a= type(a) A. <class 'int'> B. <class 'float'> C. <class 'str'> D. None of the above. - Precise Answer โโA Q 7. What is the output of the following lines of code in Python programming? a=1. type(a) A. <class 'int'> B. <class 'float'> C. <class 'str'> D. None of the above. - Precise Answer โโB Q 8. What is the output of the following lines of code in Python programming? a='Bob' type(a) A. <class 'int'> B. <class 'float'> C. <class 'str'> D. None of the above. - Precise Answer โโC
D. None of the above - Precise Answer โโB Q 14. Which of the following data types support key-value pairs in Python programming? A. List B. Array C. Dictionary D. None of the above - Precise Answer โโC A 15. What is the output of the following lines of code in Python programming? interesting = True easy = False if interesting and easy : print ('Learn more about it ..! ') else : print ('Move on .. ') A. 'Learn more about it ..! B. 'Move on .. C. Error D. None of the above - Precise Answer โโB