2- Generate a (5, 5) numpy array that consists of random values between 20 and 40 and answer the following: (Check this function np.random.random_integers ) a. What is the minimum value in each row b. What is the mean for each column c. Count the number of elements in the array whose values are greater than 30 d. Display the elements in the arrays that are less than 30 e. Add 5 to elements whose value is less than 30. f. Display the top 10 elements in the array

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question

PYTHON 

2- Generate a (5, 5) numpy array that consists of random values between 20 and 40 and
answer the following: (Check this function np.random.random_integers )
a. What is the minimum value in each row
b. What is the mean for each column
c. Count the number of elements in the array whose values are greater than 30
d. Display the elements in the arrays that are less than 30
e. Add 5 to elements whose value is less than 30.
f. Display the top 10 elements in the array
Transcribed Image Text:2- Generate a (5, 5) numpy array that consists of random values between 20 and 40 and answer the following: (Check this function np.random.random_integers ) a. What is the minimum value in each row b. What is the mean for each column c. Count the number of elements in the array whose values are greater than 30 d. Display the elements in the arrays that are less than 30 e. Add 5 to elements whose value is less than 30. f. Display the top 10 elements in the array
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage