Question: please solve the python questions 1 and 2 SECTION 2 (50 Marks Question One 120 Marks (a) Using the Symbolic python library (sympy), write well-commented

 please solve the python questions 1 and 2 SECTION 2 (50

Marks Question One 120 Marks (a) Using the Symbolic python library (sympy),

please solve the python questions 1 and 2

SECTION 2 (50 Marks Question One 120 Marks (a) Using the Symbolic python library (sympy), write well-commented codes to execute the following: I. Differentiate esin 2xy with respect to x then y. II. Differentiate sin(x2 + 3x + 1) with respect to x. III. Se 2x + 1 dx IV. Working overtime is defined as having worked more than 40 hours during the week. Given the variable hours_worked, write an expression that evaluates to True if the employee worked overtime. V. Use two variables k and total to write a for loop to compute the sum of the squares of the first 50 counting numbers and store this value in total. Thus, your code should put 1*1 + 2*2 + 3*3 +...+49*49 + 50*50 into total. Use no variables other than k and total. (12 marks) (b) A biomedical engineer built 10 different models to predict if a tumour is benign or malignant. To evaluate and select the best model, you are required to calculate the sensitivity of each model using the formula, Si=tp: / (tpi + fni), where tp and fin are lists containing the True Positives and False Negatives values, respectively. Write a well-documented code to create a list of sensitivity of the 10 models. (8 marks) Question Two [15 Marks] i. Write a well-commented python code that creates a list called array1. Using the for loop, add the numbers from 0 to 50 with a step of 2 to array1. (3 marks) Illustrate with a table, the list created, showing both the positive and negative indexes. (2 marks) What is the role of dexing in a list or tuple? (1 mark) ii. 111. Department of Biomedical Engineering, University of Ilorin, Ilorin, Nigeria Page 1 of 2 iv. Use python code to find: a) the number of elements in the list, array1 b) the number of even elements c) elements that are divisible by 10 d) The maximum, minimum and average of the elements in list, array1 (8 m Write an expression that evaluates to True if and only if the boolean value assigned to worked overtime is True. (1 m

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!