Checkpoint 1-revision

Checkpoint 1-revision

9th Grade

9 Qs

quiz-placeholder

Similar activities

Javascript Arrays

Javascript Arrays

9th - 12th Grade

12 Qs

Exploring Matplotlib and NumPy

Exploring Matplotlib and NumPy

9th Grade

5 Qs

Pandas library

Pandas library

9th Grade

10 Qs

Chapter 1 - Algorithm and programming( 9Gen)

Chapter 1 - Algorithm and programming( 9Gen)

9th Grade

10 Qs

RL NumPy Quiz 1

RL NumPy Quiz 1

9th - 12th Grade

10 Qs

CG Module5 Numpy

CG Module5 Numpy

4th Grade - University

13 Qs

Arrays += Chan

Arrays += Chan

9th - 12th Grade

12 Qs

บทที่ 2 2.1 ม.3/4

บทที่ 2 2.1 ม.3/4

9th - 12th Grade

7 Qs

Checkpoint 1-revision

Checkpoint 1-revision

Assessment

Quiz

Computers

9th Grade

Hard

Created by

Adhra Mohamedalmansoori

FREE Resource

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Mona created a small program in Python that uses NumPy library. She used this library to store his data in a multi-dimensional _______ data structure. This structure allowed her to perform advanced mathematical and scientific calculations in his program.

    list

  array

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python, to import the NumPy library as the name "np", we typically code as:

import numpy as np

Which one of the following would also be valid for importing the NumPy library?

    import numpy as npLibrary

  numpy import as np

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Mahmoud wants to create a NumPy array using a range of values. He has typed and ran the following statement.

 

import numpy as np

array = np.arange(2, 15, 4)

print(array)

 

What is the output?

  1. [ 2 6 10 14 ]

  1. [ 4 6 8 10 12 14 15 ]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Mona wants to store the sportscar data in the order below in a NumPy array.

 

 

import numpy as np
sportsCars = np.array([
"Ferrari","Lamborghini","McLaren"])

import numpy as np
sportsCars = np.array([
"Ferrari","Lamborghini","McLaren"])

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Ali created a single dimension NumPy array, as shown below.

What single function should he use to split the array into 6 rows and 2 columns?

    reshape

    append

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Mona created a NumPy array, as shown below.

What single function should she use to change each of the rows to be a column and each column to a row?

  transpose

  reshape

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

 Ibrahim created 2 NumPy arrays to store his famous Emirati authors and their books, as shown below.

What single function should he use to append the arrays, so the final array is as follows?

  1. reshape

  1. vstack

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Mona was given all her school’s library book details in a comma-separated values (csv) file. The file was called books.csv , and it contained the title, author, ISBN and date published for each book.

 

To store the data from the file into a Pandas dataframe, what should Farah type?

  1. import pandas as pd

df_books = pd.read_csv("books.csv")

  1. import pandas as pd

df_books = pd.to_csv("books.csv")

9.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Look at the table showing the statistics of the top 5 drivers of the previous Formula 1 2022 season:

Zayn has stored the data in a Pandas dataframe called df_results .

 

To print only Charles Leclerc’s results, like below, what is the correct code?

  1. print(df_results.loc["Charles Leclerc"])

print(df_results.append["Charles Leclerc"])