Search Header Logo

PYTHON(28.07.2023)

Authored by Anandhi Technology

Computers

Professional Development

Used 1+ times

PYTHON(28.07.2023)
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is used to create an identity matrix in NumPy?

zeros()

ones()

arange()

eye()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code?

import numpy as np
a = np.array([[1, 2], [3, 4]])
print((a).ndim)

0

1

2

3

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of the following code?

import numpy as np
a = np.array([1, 2, 3])
b = np.array([4, 5, 6])
c = np.concatenate((a, b))
print(c)

[[1, 2, 3], [4, 5, 6]]

[[1, 4], [2, 5], [3, 6]]

[1, 2, 3, 4, 5, 6]

Error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

import numpy as np

a = np.array([(10,20,30)])

print(a.itemsize)

2

4

3

6

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is correctly evaluated for this function?

  1. pow(x,y,z)  

  1. (x**y) / z

  1. (x / y) * z

  1. (x**y) % z

  1. (x / y) / z

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

"pythoncode"[6:]  

What will be the output of this code?

python

code

pythoncode

error

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?