Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Note: Set a random seed of 100 for this assignment. All arrays should contain random numbers between 0 and 1 (zero is inclusive).
- Create a one-dimensional array of twenty float random numbers.
- Assign the sum of these values to Q1.
- Assign the max of these values to Q2.
- Create a four by five array of random numbers.
- Take the minimum values in each array and create an array of those values. Assign it to Q3.
- Assign the mean of all the array values to Q4.
- Create an array with the following values: 2, 3, np.nan (this should represent a missing value), and 5. Use a numpy function to find the sum of the values in this array. Assign the sum to Q5 (you should expect a numerical value here).
- Create two separate arrays each containing four random numbers. Concatenate the two arrays and assign it to Q6.
- Create a four by four array of random numbers and call it q7. Concatenate this array with itself and assign it to Q7.
- Create a two by four array of random numbers and call it q8. Vertically stack this array on q7. Assign it to Q8.
- Vertically stack the following arrays in sequence: q7, q7, q7, q8 and q8. Assign it to Q9.
- Create a two by one array of random numbers. Horizontally stack this array on q8. Assign it to Q10.
- Create an array of twenty random numbers called q11. At the fifth value, split this array into two. That is, the sixth value should begin the new array. Assign the first part to Q11a and the second part to Q11b.
- Split q11 into three parts at the tenth and fifteenth values (that is, the eleventh and sixteenth values should begin the new arrays). Assign the first part to Q12a, the second part to Q12b, and the third part to Q12c.
- Create a five by five array of random numbers called q13. At the third array, vertically split this array into two (that is, the fourth array should begin the new array). Assign the first part to Q13a and the second part to Q13b.
- At the third value, horizontally split this array into two (that is, the fourth value should begin the new array). Assign the first part to Q14a and the second part to Q14b.
I got helped with the first four parts, I need help with the rest. please and thank you.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 7 images
Knowledge Booster
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
- How does one go about keeping track of items that have data while working with an array that is only half populated?arrow_forwardProgramming language: Processing from Java Question attached as photo Topic: Use of Patial- Full Arraysarrow_forward- Create a 6 by 8 array of random integer numbers ranged from -35 to 70, - Find how many -ve numbers in the array? - Multiply the array by -5 - Find the location of maximum and the minimum number in the array - List the contents of the array in matlaparrow_forward
- ALert dont submit AI generated answer.arrow_forwardCreate an array called sales to monitor one week's worth of sales over the course of two months. Assign sales data to the array's elements. Then, in a loop, compute the average sales for the one week of each of the two months that are recorded in the array.arrow_forwardArray a is an integer array with all the elements in ascending order. The element at position 15 is the 15th largest and also the 15th smallest. You can assume integers are 4 bytes long. How many bytes are there in the array? O 116 124 O None of the other answers is correct. 120arrow_forward
- 5 نقاط Q1. Write a code to find the summation of all numbers that are less than or equal to 10 in the array. C= {-10, 35, 10, -5, 6, 16, -23, 94, -22, 12, 202, -52O, 0, .-3}arrow_forwardUse an array. The program should read 25 integers from a user. Each value should be between 5- 100 (5<-value<-100). As the user inputs values store all the values which are not a duplicate. Print all the array values at the end. Use the smallest possible array.arrow_forwardIn this assignment, you will decide how to keep the inventory in the text file. Then your program must read the inventory from the file into the array. Each product must have a record in the file with the name, regular price, and type. There are several options for storing records in the file. For example, • each value takes one line in the file (i.e., three lines for one product). Then you must take care of correct handling of the ends of the lines; • all values are in one line that can be read as a string. Then you must handle the parsing of the string; • all values are in one line separated by a delimiter. Then you must handle a line with delimiters. Assume that the inventory does not have more than 100 products. But the actual number is known only after the reading of the file. Once you can read data from the file into the array, you must add a new property to the product class – a static variable that holds the number of products in the inventory. Its value must grow as reading…arrow_forward
- Use a one-dimensional array to solve the following problem. Read in 20 numbers, each of which is between 20 and 50, inclusive. As each number is read, validate it and check its value. Numbers greater than 40 are to be stored as they are. Numbers that are less than or equal to 40 should be doubled and then stored. After reading all the values, display all the values which were stored.arrow_forwardProgram: Using a multidimensional array, create a triangular-shaped array. You will ask the user how many lines they want to see and then create the array, fill it, and then print it. You will fill the array with one 1 in the first row, two 2’s in the second row, etc. This should work for any integer that the user enters. (Just because I am starting on 1 does not mean row 0 was skipped.) You must: use a loop to create the array shape. You must: use nested for loops to fill the array and to print the values back to the screen. Your program should print as shown below. Example Output: How many lines would you like in your triangle? >>>9 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 If your code looks like the code below, it is not what I’m asking for. The code below is making a square multidimensional array, not a triangular one. The code below is just leaving certain spots empty so that it looks like a triangle. I will ask you…arrow_forwardThe contents of the array below represent a maxHeap. What would be the contents of the array after a deletion. Briefly explain how the deletion is done. 60 20 30 5 10 15 25arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education