Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

NumPyA 7 - FOR CREDIT Create a . ipynb file called NumPyA 7 credit.ipynb and complete the following. For this assignment load but DO NOT

NumPyA7- FOR CREDIT
Create a .ipynb file called NumPyA7credit.ipynb and complete the following.
For this assignment load but DO NOT INSTALL NumP: run the following at the top of
your script and then complete the questions:
import numpy as np
Assume all arrays are NumPy arrays, unless otherwise specified
Everything is case sensitive, so BE CAREFUL
After you create the object (e.g., Q1), DO NOT PRINT! Your file should something look
like this:
Q1=[Hello]
Q2= x[3:]
Before attempting these make sure to watch CodeGrade
Walkthrough in module 1- if you do not you will not
understand how assignments work!
For reference:
CodeGrade tips and FAQ
CodeGrade - What to do if my code doesnt work?
Create an array of even integers two through sixteen called q1. Index that array to
obtain the following:
Assign it to Q1.
Create the following array called q2:
Then index q1 with q2. Assign it to Q2.
Reshape q1 into a four by two array. Assign it to Q3.
Index Q3 to obtain the following array:
Assign it to Q4.
Index Q3 to obtaining the following array:
Assign it to Q5.
Set a random seed of 6.
Create an array of ten random integers 0 through 9. Then sort the array so the
values are in numerical order. Assign it to Q6.
Create a four by five array of random integers 0 through 9 and call it q7. Then
sort the array by columns. Assign it to Q7.
Now sort the q7 array by rows. Assign it to Q8.
Create a structured array, called q9, with the following information:
Fruit Color Ranking
Grape Purple 3
Apple Red 2
Banana Yellow 1
Index q9 to obtain the following:
Assign it to Q9.
Index q9 to obtain the following:
Assign it to Q10.
Index q9 by all Rankings less than 3. Assign it to Q11.

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

Case Studies In Business Data Bases

Authors: James Bradley

1st Edition

0030141346, 978-0030141348

More Books

Students also viewed these Databases questions