Home / Expert Answers / Computer Science / how-would-i-create-this-program-without-numpy-or-scipy-a-python-program-that-will-perform-the-fo-pa632

(Solved): How would I create this program without numpy or scipy? a Python program that will perform the fo ...



How would I create this program without numpy or scipy?

a Python program that will perform the following sequence of the ions :
A. Using random number generator, create 2 arrays (ArD. Find the minimum and the max values in Array 3. (not allowed to use min and max methods )
E. Create a new array ( Array_4

a Python program that will perform the following sequence of the ions : A. Using random number generator, create 2 arrays (Array_1 and Array_2 ). Array_1 consist of 10 random integer numbers that are between 1 - 5 inclusive. Array_2 consist of 10 random integer numbers that are between inclusive. Display Array_1 followed by Array_2 in 2 separate lines. B. Create new list ( Array_3 ) that contain all elements of Array_1 and elements of Array_2. Display Array_3. Array_3 is created according to the following rules : Element 1 from Array_1 followed by element 1 from Array_2 followed by element 2 from Array_1 followed by element 2 from Array_2 ....etc. C. Display the second integer from Array_3 and then calculate and display the number of occurrences of the second integer in Array_3. (Not allowed to use the count method ) D. Find the minimum and the max values in Array 3. (not allowed to use min and max methods ) E. Create a new array ( Array_4 ) by removing all duplicate Integers that are in Array_3. Display Array_4 and then display length of Array_4 (Not allowed to use any python methods such as set ) F. Sort the Integers in Arrays_4 in descending order from highest to lowest. Display Array_4. ( Not allowed to use a sort method ) G. Reverse the elements of array_4. Display the reversed array ( Not allowed to use the reverse method)


We have an Answer from Expert

View Expert Answer

Expert Answer



Part A: Two arrays, Array_1 and Array_2, are created using list comprehension and random number generation. The print() function is used to display the arrays on separate lines.
Part B: An empty list called Array_3 is created. A for loop is used to iterate through both Array_1 and Array_2 simultaneously, and each element is appended to Array_3 in the order specified. The print() function is used to display Array_3.
Part C: The second integer in Array_3 is found using indexing, and the number of occurrences is counted using a for loop and conditional statements.




We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe