Zed-King Institute
    All Notes

    O Level · Chapterwise MCQ

    Chapter 9: NumPy Basics — MCQ

    Zed-King Study app · Free

    O Level students across India practise here, free

    Daily M1–M4 quizFull 100-question mocksAll-India rank
    Open the free app

    Google login · no Play Store needed

    🏆 Free All-India Sunday Mock · Sun, 29 Nov, 11 AM · CCC + O LevelRegister

    About this PDF

    Chapter 9 — multiple-choice questions on NumPy arrays, data types, shape, size, dimensions and array operations.

    This is part of the free O Level M3-R5.1 study material in the Zed-King Study Zone. You can read every page above in your browser, or download the file and study offline. Zed-King Group of Institute is a NIELIT Study Centre in Kaithal, Haryana, and all of this material follows the current NIELIT syllabus.

    Course
    O Level — NIELIT Foundation Diploma
    Module
    M3 — M3-R5.1: Programming and Problem Solving through Python
    Section
    Chapterwise MCQ
    Format
    PDF — read online or download
    Price
    Free, no sign-up required

    Text from this PDF

    The opening pages as plain text — open the reader above for tables, diagrams and the full file.

    Chapter:9 Numpy Basics

    Q1. NumPy stands for__________ · (a) Numbering Python · (b) Number Pytho · (c) Numerical Python · (d) None

    Q2. Numpy was developed by_______ · (a) Guido van Rosum · (b) Travis Oliphant · (c) Wes McKinney · (d) Jim Hugunin

    Q3. _____helps to check the data type of an array. · (a) arraydtype() · (b) arr.dtype() · (c) dtype.arr() · (d) None

    Q4. Ndarray is also known as the ____array. · (a) Array (b) alias · (c)variable (d) None

    Q5. Shape() function in Numpy array is used to ______. · (a)Find the shape of the array · (b) change the shape of the array · (c) display elements · (d) None

    Q6. Which of the following keyword is used to access the numpy module in python? · (a) Form (b) access · (b) import (d)none

    Q7. ______ create an uninitialized array of specified shape and dtype? · (a)full (b)empty · (c)initiate (d)none

    Q8. Npeye() is used for creating · (a) Identify matrix · (b) upper triangle matrix · (c) lower triangle matrix · (d) none

    Q9. _______ will be the output of the following Python code.

    a = np.array([1,2,3,5,8])

    a=a+1 print(a[1])

    Q 10 _______is the use of the zero()

    function in Numpy array in python.

    (c) both a and b (d) none

    Q 11 What is the output of the following program in python?

    a = np.array([1,2,3,5,8])

    b = np.array([0,3,4,2,1])

    c = a+b c = c*a print(c[2])

    (c) 20 (d) None

    Q 12 Numpy arrays can be _____ · (a) Indexed (b) Sliced · (c) Iterated (d) All of the above

    Q 13 Observe the following code and Identify what will be the outcome a=np.array([1,2,3,4,5,6])

    print(a)

    Q 14. What will be the output of the following code?

    print(np.maximum([2,3,4],[1,5,2]))

    Q 15, What is the output of the following code?

    print(y.ndim)

    Q16.What is NumPy primarily used for? · A) Web development · B) Numerical computing · C) Data visualization · D) Machine learning

    Q17. How can you import NumPy in a Python script? · A) import numpy · B) import np · C) import numpy as np · D) from numpy import *

    Q18. Which of the following data structure is the primary building block of NumPy? · A) List · B) Tuple · C) Dictionary · D) Array

    Q19.What method is used to create a NumPy array from a Python list? · A) numpy.array() · B) numpy.array([]) · C) np.array() · D) np.array([])

    Q20. Which attribute of a NumPy array returns the shape (dimensionality) of the array? · A) shape · B) dimension · C) size · D) ndim

    Q21. Which operation is supported by NumPy arrays for element-wise arithmetic? · A) Matrix multiplication · B) Dot product · C) Element-wise addition · D) Cross product

    Q22. How do you reshape a NumPy array? · A) Using the resize() method · B) Using the reshape() method · C) Using the rearrange() method · D) Using the resize() function

    Q23. What will be the output of the following python code.

    a=np.array([1,2,3,5,8])

    print(a.ndim)

    (c ) 4 (d) none

    Q24. . What will be the output of the following python code.

    print(a.size)

    Q25 . What will be the output of the following python code.

    print(a.shape)

    (c ) (3,3) (d) None

    Q26. To create sequence of numbers, Numpy provides a function ____al=nalogous to range that arrays instead of lists. · (a) arange (b) aspace · (c)aline (d) all of the above

    Q27. How can we convert the Numpy array to the list in python? · (a) List(array) (b)list.array (c )array.list (d) None

    More chapterwise mcq for M3-R5.1

    Run these Python programs yourself — free

    Reading code is not the same as writing it. Type any program from these notes into our free online Python compiler (real Python 3 with NumPy, input() works), or study one of the explained programs with its output.

    Prepare for O Level with expert guidance

    Classroom training, practical labs and exam registration at Zed-King Institute, Kaithal.

    Drag me!