Question: Code in PYTHON Part B Write a program that takes Array A = {5,4,6,3} at the input and perform the following [marks 15] a) Calculate

 Code in PYTHON Part B Write a program that takes Array

Code in PYTHON

Part B Write a program that takes Array A = {5,4,6,3} at the input and perform the following [marks 15] a) Calculate the factorial of each element in Array A and save the corresponding results in Array B. Such that Array B = {120, 24, 720,6}. You must write a function (fact) for this part. b) Sum the elements of Array B. Part C Write a function Power(n, m) that calculates the power of a number (nm) using for loop. The user will enter the values of n and m at the run time. E.g: 2 power 3=8. [marks 10] Question # 2 [25 Marks] 15 22 3 A= 16 25 11 21 16 151 19 18 100 Write a program that initializes Array A (as given above), then initialize a 2D Array B with zeros having 3 rows and 4 columns. After that, the program must calculate the Transpose of Array A and store the result in Array B

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!