Search Header Logo

Numpy

Authored by secondary purpose

Computers

University - Professional Development

Used 75+ times

Numpy
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

import numpy as np

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

ary = ary + 1

print (ary[1])

Error

1

2

3

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

import numpy as np

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])

7

12

21

10

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

import numpy as np

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

b = np.zeros((2,3), dtype=np.int16)

c = np.ones((2,3), dtype=np.int16)

d = a + b + c

print (d[1,2])

3

4

5

Error

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

import numpy as np

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

b = np.arange(0,10,2)

c = a + b

print (c[4])

Error

13

15

9

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

import numpy as np

a = np.zeros(6)

b = np.arange(0,10,2)

c = a + b

print (c[4])

Error

8

2

10

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

import numpy as np

a = np.array([[0, 1, 0], [1, 0, 1]])

a += 3

b = a + 3

print (a[1,2] + b[1,2])

7

11

6

Error

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

import numpy as np

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

b = a.sum(axis=1)

print (b)

3

12

[3 12]

[3 5 7]

Access all questions and much more by creating a free account

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

Already have an account?

Discover more resources for Computers