Smeet Mutha Class:R&A
Roll No:PB39 Div: 02 [Link] - Colaboratory
import numpy as np
random_array = [Link](1, 101, size=(3, 4))
print(random_array)
[[41 63 43 30]
[61 67 11 85]
[36 54 3 24]]
mean_value = [Link](random_array)
median_value = [Link](random_array)
std_deviation = [Link](random_array)
print("Mean:", mean_value)
print("Median:", median_value)
print("Standard Deviation:", std_deviation)
output Mean: 43.166666666666664
Median: 42.0
Standard Deviation: 23.07897070687705
Code Text
reshaped_array = random_array.reshape((2, 6))
print(reshaped_array)
[[41 63 43 30 61 67]
[11 85 36 54 3 24]]
maximum_value = [Link](reshaped_array)
minimum_value = [Link](reshaped_array)
print("Maximum value:", maximum_value)
print("Minimum value:", minimum_value)
Maximum value: 85
Minimum value: 3
reshaped_array[reshaped_array % 2 == 0] = -1
print(reshaped_array)
[[41 63 43 -1 61 67]
[11 85 -1 -1 3 -1]]
[Link] 1/1