wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Course_ 3

Total questions: 20

Worksheet time: 20mins

Name
Class
Date
1.

Write a function called show_stars(rows). If rows is 5, it should print the following:

● *

● **

● ***

● ****

● *****

a)
b)
2.

What is the output of the following code?

eval(''1 + 3 * 2'')

a)

‘1+ 6’

b)

‘4*2’

c)

‘1+3*2’

d)

7

3.

Which options are correct to create an empty set in Python?

a)

{}

b)

()

c)

[]

d)

set()

4.

What is output of following − print(''abbzxyzxzxabb''.count(‘abb’,-10,-1))

a)

2

b)

3

c)

Error

d)

0

5.

a)
b)
c)
d)

Error

6.

Supervised learning requires training labeled data. For example, in order to do classification (a supervised learning task), you’ll need to first label the data you’ll use to train the model to classify data into your labeled groups.

a)

True

b)

False

7.

Model Testing is meaning Check the accuracy of the model through the test data

a)

True

b)

False

8.

Regression is used when the output variable is categorical , with 2 or more classes. For example, yes or no, male or

female, true or false, etc.

a)

True

b)

False

9.

You trained a binary classifier model which gives very high accuracy on the

training data, but much lower accuracy on validation data. Which of the

following may be true?

a)

This is an instance of overfitting

b)

This is an instance of underfitting

c)

This is an instance of goodfitting

10.

Which of the following is a disadvantage of decision trees?

a)

Decision trees are prone to be overfit

b)

Decision trees are robust to outliers

c)

Factor analysis

d)

None of the mentioned

11.

In sigmoid function, which is :

If z = 1000 then f(z) ≈

a)

0

b)

1

c)

\infty

d)

-\infty

12.

Find the first derivative of this equation.

Plug each value of x by 2 and choose the result of substituting the derivative equation.

f(x)' when x = 2 is ??

a)

10

b)

28

c)

-10

d)

8

13.

What is the integral result of this function?

a)
b)
c)
14.

What is the result of the root of 12*12 ?

a)

144

b)

24

c)

12

d)

14

15.

In the equation of a straight line

y = m x + b When the value of m is negative .

what is the direction of the line?

a)

up

b)

down

c)

straight

16.

If A is a matrix of order m x n and B is a matrix of order n x p then the order of AB is

a)

p x m

b)

p x n

c)

n x p

d)

m x p

17.

Calculate the dot product of

a=(1,2,3) and b=(4,−5,6) ?

a)

20

b)

16

c)

10

d)

12

18.

What is the function used in numpy to multiply arrays?

a)

divmod()

b)

multiply()

c)

remainder()

d)

power()

19.

Find the Transpose of this matrix

a)
b)
c)
d)
20.

What is the function used in numpy to Transpose array?

a)

a. T()

b)

b. transpose()

c)

c. mod()

d)

both a ,b