Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON Question 1 1. Create a variable X that is a list of integers from 1 to 10. 2. Create a variable Y that is

image text in transcribed

PYTHON

Question 1 1. Create a variable X that is a list of integers from 1 to 10. 2. Create a variable Y that is empty. 3. Using a for loop, fill each element of the variable Y with the cumulative sum of each element in X. So the first element in Y should just be the first element in X. The second element in Y should be the first element in X plus the second element in X. And so on... Question 2 2. In your function, add some documentation that describes how the function works. 3. Apply your function to the following list: x=64,2,4,9,11,2,5,6,19,40 Question 3 1. Create a NumPy Matrix that has dimensions (57) that is filled with random numbers drawn from a normal distribution with mean 20 and standard deviation of 100. Copy and paste your code into two cells and run them both. Show that you get the same results both times you run it. Question 5 1. Generate a matrix with dimensions ( 44 ) filled with random numbers generates from a normal distribution with mean 50 and standard deviation 20 using seed 23. 2. Report a matrix of bulean values that indicate which elements in the matrix take on values greater than 10. 3. Report a vector of all the values in this matrix that are greater than 10. 4. Replace all the values in the matrix that are greater than 10 with the number 10. Report the new matrix. 5. Replace all the vales in the matrix that have values less than 10 with the square root of that number. Report the new matrix. 6. Using your new matrix, generate an array in which each element is the mean of each column in your new matrix

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions

Question

In Exercises find the derivative. 2 ex + ex

Answered: 1 week ago

Question

Write a Python program to check an input number is prime or not.

Answered: 1 week ago