wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Data Analysis Quiz-1

Total questions: 49

Worksheet time: 49mins

Name
Class
Date
1.

What will be the output of the following code?

import numpy as np

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

b = a

b[0] = 99

print(a[0])

a)

1

b)

99

c)

Error

d)

None

2.

Which of the following creates a 3×3 array with all values as True?

a)

np.ones((3,3))

b)

np.ones((3,3), dtype=bool)

c)

np.bool((3,3))

d)

np.full((3,3), 1)

3.

What is the output of:

np.arange(2, 10, 2).sum()

a)

20

b)

30

c)

40

d)

24

4.

Which NumPy function returns evenly spaced numbers over a specified interval (including both start and stop)?

a)

np.arange()

b)

np.linspace()

c)

np.logspace()

d)

np.repeat()

5.

What will be the shape of the array created by:

np.zeros((2,3,4))

a)

(2,3)

b)

(2,3,4)

c)

(3,4,2)

d)

(4,3,2

6.

Output of:

a = np.array([10, 20, 30])

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

print(a / b)

a)

[10, 10, 10]

b)

[10., 10., 10.]

c)

[10., 10., 10.]

d)

[10., 10., 10.]

7.

Which function gives the number of dimensions of an array?

a)

ndim()

b)

np.ndim()

c)

array.ndim

d)

np.array_dim()

8.

What is the data type of np.arange(5) by default?

a)

int

b)

float

c)

complex

d)

object

9.

Output of:

np.array([1,2,3]) + np.array([[1],[2],[3]])

a)

Error

b)

[[2,3,4],[3,4,5],[4,5,6]]

c)

[[2,4,6]]

d)

[2,3,4,5,6]

10.

Which one gives a flattened copy of an array?

a)

ravel()

b)

flatten

c)

Both

d)

None

11.

What does np.eye(3) create?

a)

3×3 array of zeros

b)

3×3 identity matrix

c)

3×3 diagonal of ones

d)

B and C both

12.

What is the output type of np.mean([1,2,3])?

a)

int

b)

float

c)

complex

d)

None

13.

Which command gives element-wise square root?

a)

np.sqrt()

b)

np.square()

c)

np.exp()

d)

np.power()

14.

What will np.arange(3,7) produce?

a)

[3,4,5,6,7]

b)

[3,4,5,6]

c)

[3,5,7]

d)

[3,4,5]

15.

Which NumPy function gives random integers between 1 and 10 (exclusive of 10)?

a)

np.random.randint(1,10)

b)

np.random.randint(1,10,exclusive=True)

c)

np.randint(1,10)

d)

np.random.random(1,10)

16.

What is the default data type of np.zeros(3)?

a)

int

b)

float

c)

complex

d)

bool

17.

What happens if you multiply two 1D arrays of different lengths?

a)

Multiplies element-wise

b)

Gives ValueError

c)

Adds padding zeros

d)

Converts to object array

18.

Which statement is True about NumPy arrays?

a)

All elements must be of the same type

b)

They can hold multiple data types

c)

They are slower than Python lists

d)

They cannot perform slicing

19.

What will be the output?

np.array([1, 2, 3]) * 2

a)

[1,2,3,1,2,3]

b)

[2,4,6]

c)

[1,4,9]

d)

[2,3,4]

20.

np.random.rand(2,3) generates:

a)

2×3 matrix with random integers

b)

2×3 matrix with random floats [0,1)

c)

Error

d)

2×3 identity matrix

21.

What does np.all(a) return?

a)

True if all elements are non-zero

b)

True if any element is zero

c)

Sum of all elements

d)

Count of True elements

22.

Output of:

np.array_equal(np.array([1,2]), np.array([1,2,3]))

a)

True

b)

False

c)

Error

d)

None

23.

Which command converts an array into 1D?

a)

reshape(-1)

b)

flatten()

c)

Both

d)

None

24.

Output:

a = np.arange(4).reshape(2,2)

a[1,1]

a)

1

b)

2

c)

3

d)

4

25.

Which attribute returns total bytes consumed by an array?

a)

array.nbytes

b)

array.bytes

c)

np.bytes(array)

d)

array.memory

26.

output:

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

a[[True, False, True, False]]

a)

[1,2]

b)

[1,3]

c)

[2,4]

d)

[3,4]

27.

np.argmax(a) returns:

a)

Index of largest element

b)

Largest element itself

c)

ndex of smallest element

d)

None

28.

What is the result of:

np.array([[1,2],[3,4]]) + 10

a)

Error

b)

Adds 10 to every element

c)

Appends 10 as last row

d)

Adds 10 only to diagonal

29.

What is the main goal of Data Analysis?

a)

To store data securely

b)

To interpret data and make decisions

c)

To delete unnecessary data

d)

To collect social media data

30.

Which tool is most commonly used for data cleaning and preprocessing?

a)

MS Paint

b)

Python (with Pandas, NumPy)

c)

VLC Media Player

d)

Google Chrome

31.

Which of the following roles is responsible for designing and maintaining databases?

a)

Data Analyst

b)

Data Scientist

c)

Data Engineer

d)

Machine Learning Engineer

32.

In Data Science, which step comes immediately after data collection?

a)

Data Cleaning

b)

Data Visualization

c)

Data Modeling

d)

Data Storage

33.

7.

Which of the following is TRUE about Data Analytics?

a)

It is only used in scientific research

b)

It helps businesses make better decisions using data

c)

It doesn’t involve statistics

d)

It ignores past data

34.

Which of these is an example of a Data Visualization tool?

a)

Matplotlib

b)

Notepad

c)

MS Word

d)

File Explorer

35.

Which of the following languages is most popular for Data Science?

a)

Java

b)

Python

c)

C++

d)

HTML

36.

What does a Data Scientist mainly do?

a)

Build websites

b)

Develop AI and Machine Learning models using data

c)

Manage company accounts

d)

Repair computers

37.

Who is known as the “father” of Python — the language loved by data analysts?

a)

Elon Musk

b)

Guido van Rossum

c)

Bill Gates

d)

Iron Man

38.

If “Data” is raw information, then what is “Data Analysis”?

a)

Asking data how its day was

b)

Turning raw data into meaningful insights

c)

Counting numbers randomly

d)

Mixing Excel and coffee

39.

What is an array in Python (NumPy)?

a)

A storage box for multiple values of the same type

b)

A fancy list that went to gym and became faster

c)

A music playlist

d)

Both A and B

40.

What is the main difference between a list and a NumPy array?

a)

List is smarter

b)

Array is faster and supports mathematical operations

c)

List can fly

d)

Array can only store strings

41.

Which of the following is NOT a data analysis tool?

a)

Pandas

b)

NumPy

c)

Matplotlib

d)

WhatsApp

42.

In data analysis, “cleaning data” means:


a)

A) Using a broom to remove extra commas

b)

B) Removing or correcting missing or wrong data values

c)

C) Deleting all data

d)

D) Formatting your laptop

43.

Why do data analysts love Python so much?

a)

Because it’s simple, powerful, and open-source

b)

Because snakes are cute

c)

Because it was free in a sale

d)

Because Excel got jealous

44.

What does “NumPy” stand for?

a)

Number + Python

b)

Numb People Yawning

c)

Numeric Python

d)

Numbers Please Yay!

45.

Why do programmers love NumPy arrays more than Python lists?

a)

Because arrays run faster than your morning coffee ☕

b)

Because lists are lazy

c)

Because arrays can talk

d)

Because lists can’t store numbers

46.

What will this code do?

import numpy as np

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

print(a * 2)

a)

[1, 2, 3, 1, 2, 3]

b)

[2, 4, 6]

c)

Explode your laptop

d)

Show error because arrays can’t multiply

47.

What happens if you try to mix numbers and strings in a NumPy array?

a)

Python yells at you

b)

NumPy politely converts everything to strings

c)

The array runs away

d)

Error!

48.

If np.ones((3,3)) gives a matrix of 1’s, what will np.eye(3) give?

a)

A staring contest 👀

b)

A 3×3 identity matrix

c)

A mirror

d)

All zeros

49.

Predict the output:

import numpy as np

x = np.array([[10, 20, 30],

[40, 50, 60]])

print(x[0][1] + x[1][0])

a)

60

b)

70

c)

90

d)

It prints a heart ❤️