Introduction to NumPy (easy)

Introduction to NumPy (easy)

University

10 Qs

quiz-placeholder

Similar activities

G7 - Ôn tập C1,2

G7 - Ôn tập C1,2

KG - University

10 Qs

Inteligencia de Negocios

Inteligencia de Negocios

University

10 Qs

computer Networks

computer Networks

University

10 Qs

DCN5511: Chapter 5 - 7

DCN5511: Chapter 5 - 7

University

15 Qs

 QUIZ  MS Core Java Quiz-3 2023

QUIZ MS Core Java Quiz-3 2023

University

11 Qs

Tutorium 1 - Prog2

Tutorium 1 - Prog2

University

11 Qs

GAMTEK - PERTEMUAN 2

GAMTEK - PERTEMUAN 2

University

10 Qs

HTML Tag

HTML Tag

University

15 Qs

Introduction to NumPy (easy)

Introduction to NumPy (easy)

Assessment

Quiz

Computers

University

Practice Problem

Easy

Created by

Prynze Reyes

Used 12+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Already have an account?