Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

#Exercise 1 [30 Points] ##Q1. [12 Points] Create array Array1 that contains the following elements: [1.1, 1.2, 1.3, ..., 30.0] . Generate Array2 from Array1

image text in transcribed

#Exercise 1 [30 Points] ##Q1. [12 Points] Create array Array1 that contains the following elements: [1.1, 1.2, 1.3, ..., 30.0] . Generate Array2 from Array1 that follows The 1st element in Array2 is the 1st element in Array1. . Starting from the 2nd element in Array 2, we have o the 2nd element in Array2 is the 2nd element in Array1 minus the 1st element in Array 1 o the 3rd element in Array2 is the 3rd element in Array1 minus the 2nd element in Array1 the 4th element in Array2 is the 4th element in Array1 minus the 3rd element in Array1 . Based on a conditional statement with 3 branches, print out which condition the average of the Array2 satisfies (1) smaller than 0.11 (2) between 0.11 and 0.13 (3) higher than 0.13. Compute the sum of square roots of all the even elements in Array1 (2nd element, 4th element, 6th element,...). For this question, np.repeat, np.linspace functions, and loops are not allowed. In [@]: #Create Array1 Array1=np. linspace(1,30,300) print(Array1) In [@]: #Create Array2 print(Array) In [@]: #Construct your conditional statement here In [@]: #Compute the sum of the square roots of all the even elements in Array1

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