Introduction to NumPy (easy)

Introduction to NumPy (easy)

University

10 Qs

quiz-placeholder

Similar activities

Tools Data Science

Tools Data Science

University

10 Qs

python quiz

python quiz

University

10 Qs

Python Quiz 1.6

Python Quiz 1.6

University

12 Qs

Python Quiz - 6

Python Quiz - 6

University

10 Qs

Data Analytics using Python - Quiz 1

Data Analytics using Python - Quiz 1

University

10 Qs

Python Pandas Series

Python Pandas Series

University

15 Qs

Data Analytics using Python - Quiz 2

Data Analytics using Python - Quiz 2

University

15 Qs

Java Arrays

Java Arrays

University

10 Qs

Introduction to NumPy (easy)

Introduction to NumPy (easy)

Assessment

Quiz

Computers

University

Easy

Created by

Prynze Reyes

Used 12+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

line 1: import numpy as np

line 2: array = ______ ([1,2,3,4,5])

array

FILL IN THE BLANK

np.Array

np.array
numpy.array
np.arrayy

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Line 1: array = np.array([1,2,3,4,5])

Line 2: print(array[2])

What will the code print?

3
6
4
2

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

import numpy as np

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

array[1] = 7

print(array)

What does line 3 do?

Prints the 'array' without any changes.
Updates the value at index 1 in the 'array' to 7.
Adds a new element with the value 7 at index 1 in the 'array'.
Deletes the element at index 1 in the 'array'.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

import numpy as np

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

array[1] = 7

print(array)

What will the code print?

[1,7,7,4,5]
[1,7,3,7,5]
[1,2,3,4,5]
[1,7,3,4,5]

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

import numpy as np

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

array += 10

print(array)

What does this code print?

[21, 22, 23, 24, 25]
[6, 7, 8, 9, 10]
[11, 12, 13, 14, 15]
[10, 10, 10, 10, 10]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

import numpy as np

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

sum_all = np.sum(array)

print(sum_all)

What is the result of this code?

10
15
20
25

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

import numpy as np

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

sum_all = ______(array)

print(sum_all)

Fill in the blank

np.Sum

np.addition

np.sum
np.add

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?