Introduction to NumPy (easy)

Introduction to NumPy (easy)

University

10 Qs

quiz-placeholder

Similar activities

JAVA QUIZ-1

JAVA QUIZ-1

University

10 Qs

SQL JOINS

SQL JOINS

University

10 Qs

Python Quiz 1.4

Python Quiz 1.4

University

12 Qs

Python-quiz2

Python-quiz2

University - Professional Development

11 Qs

Computational Thinking in Python[Quiz 3]

Computational Thinking in Python[Quiz 3]

University

15 Qs

Mini 2 (5junio)

Mini 2 (5junio)

University

10 Qs

JRB2 Quiz 4

JRB2 Quiz 4

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?