1. _____________ means operating an array, such as object or list, or doing operations element by element.
Vectorization
Standardrization
2. What would be the output of the range function:
start= 10
stop = 20
step = 2
range (start, stop, step)
3.
The below code
x=2
for x in range(x+1,x+8):
print(x, end=" ")
will print
4.
Which of the below numpy attributes describe the number of rows and
number of the columns in the array
ndim
shape
size
dtype
1a.
Vectorization
In vectorization the process of operating array occurs at a time and also the operations of array occurs element by element
2a.
start= 10
stop = 20
step = 2
range (start, stop, step)
The output of the following code is range(10, 20, 2)
But in range function by considering start as 10 and stop as 20 and step as 2
it gives the output 10,12,14,16,18
It will print the range from 10 to 20 by considering step as 2
Given Code screenshot;
Code by given logic;
3a
x=2
for x in range(x+1,x+8):
print(x, end=" ")
The above code will give Indentation error
The indentation is not correct for the print statement
But when we rectify the indentation and if we execute the code it will give
3 4 5 6 7 8 9 as output
Given code output ;
Code after rectifying Indentation ;
4a
The numpy attributes that describe the number of rows and number of columns in an array
Shape
it Indicates the number of rows and number of columns of the array
Remaining options
ndim
It is used to find the number of dimensions in an array
size
it is used to find the total elements of array
dtype
it is used to represent the data type and bytes of an array
Get Answers For Free
Most questions answered within 1 hours.