4. (8 points) You have two strings: str2=and seven strl= Four score What do these commands print? Be sure to make it clea 4. (8 points) You have two strings: str2=”and seven” strl= “Four score” What do these commands print? Be sure to make it clear where white space appears. f a) print(str1+str2) b) print(strl,str2) e) print(3*strl) d) print(strl(2:6) 5. (9 points) my_array is to be 2-dimensional with 10 rows and 2 columns. We would like the array to be initialized such that all entries are the floating point value 3.0. You may assume that numpy has been imported as np. When creating the array, you may use a numpy function but you may NOT use +,-, *, or any other similar operator. a. Create the array using a single command. b. What is the simplest way to select column 0 and all rows without using the number of rows in the expression? What is the simplest way to select rows 2 through 4 and all columns without using the number of columns in the expression? c.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *