Question: I just need #1-3 in python 1. Write code in Python that loops over every number from 1 to 12, printing a message when it

I just need #1-3 in python
1. Write code in Python that loops over every number from 1 to 12, printing a message when it reaches the 7th step. Then modify this code to increment a floating point variable from 1.0 to 12.0 in steps of 1.0, printing a message when it comes to the 7th step. Make sure you do this in a safe way, given you are comparing floating point numbers. 2. a) Print all the numbers from 0 to 200 that are divisible by 2 or 7, but not by 3. b) Print the integers from 1 to 20, raised to the power of 1.5. 3. Write statements that generate the following sets of valucs as lists, and then statements that generate them as arrays: (1.0,1.5,2.0,2.5,3.0,3.5), (-1,-2,-3.-4,-5,-6), (1,4,7,10,13,16). Also write a (user-defined) function that given a number y, returns an array of evenly spaced values ranging from (and including) 0 to . Call your function to show it works. 4. Given a 2-D array of 9 rows by 8 columns, write expressions for the following slices: a) the last 3 rows, b) the first five elements of the first two rows, c) the last 3 elements of row 7. 5. Using Python, plot the function f(a) cos( between -5 and +5. with appro- O Type here to search 332 AM 10y22/2018
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
