Python - Numpy Quiz 1

Python - Numpy Quiz 1

University - Professional Development

5 Qs

quiz-placeholder

Similar activities

Java Arrays

Java Arrays

University

10 Qs

C-Lab-Arrays

C-Lab-Arrays

University

10 Qs

Senz AIoT Savants  - ML & C++

Senz AIoT Savants - ML & C++

Professional Development

10 Qs

C++ vs Python: A Quiz Introduction

C++ vs Python: A Quiz Introduction

11th Grade - University

10 Qs

Python Quiz - 6

Python Quiz - 6

University

10 Qs

Introduction to NumPy (easy)

Introduction to NumPy (easy)

University

10 Qs

Data Analytics using Python - Quiz 1

Data Analytics using Python - Quiz 1

University

10 Qs

NumPy

NumPy

Professional Development

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