Question: 15-20 di alph extended e')) e alph.insertide') 15. Given num-14.6. 3. 2.7. 1. 5]. How can we access the second to the fifth item? a)
di alph extended e')) e alph.insertide') 15. Given num-14.6. 3. 2.7. 1. 5]. How can we access the second to the fifth item? a) num[2:5) b) num[1:51 c) num[261 d) num[16] c) num[47) c) N = prod(size(B)) d) N-length(B) e) Both cand d 20. In MATLAB, which of the following expressions generates an evenly spaced vector x containing 15 values between 4 and 207 a) x=linspace(4.15.20) b) x-linspace(15.4.20) c) x=linspace(4,20,15) d) x 4.15.20 e) x 420:15 SECTION B. (10 POINTS) In Python, a variable must be declared before it is assigned a value True or False? 16. Given the tuplc ('can' fan' 'man, pan") Which of the following statements replaces the third element of a with the string rain a) a 21- 'ran b) (2) ran c) a[31 - Fran d) (3) = 'ran c) None of the above 17 Which of the following is not a tuple? a) (1. True foo) b) (1.) c) (('foo')) d) Both bande e) None of the above 2. * = str(3). y - int(3), z = float(3) means x will be 3. y will be '3' and z will be 3.0 True or False? 3. Float can also be scientific numbers with an "e" to indicate the power of 10.T/F 4. In Python, print("Success") and print("Success") give two different outputs True or False? 18. What signifies the end of a statement block or suite in Python b) d) A line that is indented less than the previous line ) End 5. Write out the data types of the following: (a) 5 - 6j (b) False (c) array' (d) Tell (e) [1,2,3] D (1,2,3) g) (1,2,3) 6. Evaluate the following a) False or True and not False or False and True b) True and not False or False and not True 19. In MATLAB, which of the following determines the number of elements N of the matrix B? a) N-size(B) b) N = elem(B) 7. Given x = 7 and y-2. Evaluate the following
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
