Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python code 1: Write a Python program using NumPy that does the following: 1. Create two NumPy arrays, grades and weights, each with 5 elements.

python code image text in transcribed
1: Write a Python program using NumPy that does the following: 1. Create two NumPy arrays, grades and weights, each with 5 elements. The grades array represents test scores (e.g., [85, 90, 78, 92, 88]), and the weights array represents the corresponding weight of each test (e.g., [0.2, 0.1, 0.15, 0.25, 0.2]). 2. Calculate and print the weighted average of the test scores using the formula: weighted_average =( grades [0] * weights [0])+( grades [1] * weights [1])++ (grades[n] * weights[n]). 3. Create a new NumPy array called adjusted_grades that increases each test score in the grades array by 5 points. 2: Write a Python program using NumPy that does the following: 1. Create a NumPy array with 5 rows and 4 columns, filled with random integer values between 1 and 100 . 2. Calculate and print the minimum value in each row and the maximum value in each column

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions