Python - Numpy Quiz 1

Python - Numpy Quiz 1

University - Professional Development

5 Qs

quiz-placeholder

Similar activities

C Program Array and strings

C Program Array and strings

University

10 Qs

RVS_Tech_quizz_even2024-25

RVS_Tech_quizz_even2024-25

University

10 Qs

Tools Data Science

Tools Data Science

University

10 Qs

Computer programming-Array

Computer programming-Array

University

10 Qs

Arrays

Arrays

University

6 Qs

JAVA array

JAVA array

12th Grade - University

10 Qs

Part1 Array

Part1 Array

University

6 Qs

csharp

csharp

University

10 Qs

Python - Numpy Quiz 1

Python - Numpy Quiz 1

Assessment

Quiz

Professional Development, Computers

University - Professional Development

Hard

Created by

Max Diender

Used 59+ times

FREE Resource

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is a correct syntax to create a NumPy array?

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

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

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

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is a correct syntax to print the numbers [3, 4, 5] from the array below:


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

print(arr[2:5])

print(arr[2:6])

print(arr[2:4])

print(arr[3:6])

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is a correct syntax to return the shape of an array?

shape(arr)

arr.shape

arr.shape()

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the correct syntax to reshape the array below into 4 arrays with 3 elements?


arr = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])

newarr = arr.reshape(3, 4)

newarr = arr.shape(3, 4)

newarr = arr.reshape(4, 3)

newarr = arr.shape(4, 3)

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is a correct method to join two or more arrays?

np.join()

np.array_join()

np.concatenate()