Search Header Logo

Module 2 Review

Authored by Bayu Prasetya

Computers

Professional Development

Used 26+ times

Module 2 Review
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 mins • 8 pts

Media Image

Perhatikan tabel di atas. Manakah query yang sesuai untuk menampilkan jumlah distrik di setiap negara-negara di benua Asia, diurutkan dari yang paling banyak.

Media Image
Media Image
Media Image
Media Image

2.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Dengan SQL, bagaimana kita memilih semua catatan dari tabel bernama "Person" di mana nilai kolom "FirstName" mengandung karakter "al"

SELECT * FROM Persons WHERE FirstName LIKE "%al%"

SELECT * FROM Persons WHERE FirstName LIKE "_al_"

SELECT * FROM Persons WHERE FirstName = "al"

SELECT * FROM Persons WHERE FirstName LIKE "%al"

3.

MULTIPLE SELECT QUESTION

2 mins • 8 pts

Fungsi yang digunakan saat kita ingin membuat angka acak berdistribusi normal adalah...

numpy.random.randint()

numpy.random.randn()

numpy.random.normal()

numpy.random.random()

numpy.random.random_sample()

4.

MULTIPLE CHOICE QUESTION

2 mins • 10 pts

import numpy as np

arr = np.arange(1,21)

arr = arr.reshape(4,5)

print(arr)

Output dari syntax ini adalah ...

[[ 1 2 3 4 5]

[ 6 7 8 9 10]

[11 12 13 14 15]

[16 17 18 19 20]]

[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]

Error

[ 1 2 3 4 5]

[ 6 7 8 9 10]

[11 12 13 14 15]

[16 17 18 19 20]

[[ 1 2 3 4]

[ 5 6 7 8]

[ 9 10 11 12]

[13 14 15 16]

[17 18 19 20]]

5.

MULTIPLE CHOICE QUESTION

2 mins • 10 pts

import numpy as np

arr = np.arange(1,21)

arr = arr.reshape(-1)

print(arr)

Output dari syntax ini adalah ...

[ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20]

Error

[[ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20]]

[[ 1] [ 2] [ 3] [ 4] [ 5] [ 6] [ 7] [ 8] [ 9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]]

[20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]

6.

MULTIPLE SELECT QUESTION

1 min • 6 pts

 

Manakah dari sintaks ini yang akan memilih index bernama "foo" dari DataFrame "df" ?

df['foo']

Tidak ada yang tepat

df.loc['foo',:]

df.loc[:,'foo']

df['foo'][:]

7.

MULTIPLE SELECT QUESTION

1 min • 7 pts

Lengkapi perintah ini agar menampilkan data dari baris ke 3 sampai 10 pada kolom yang mempunyai nama "Restorant A" dan "Restorant B"

df.loc[3:11, ["Restorant A","Restorant B"]]

df[2:10][["Restorant A","Restorant B"]]

df.iloc[2:10, ["Restorant A","Restorant B"]]

df[["Restorant A","Restorant B"]]

Semua benar

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?