EXERCISE 15 Write a function Your first name_Last name_Ex15 with three variables x, y, and z as input arguments. These variables can either be scalars, vectors (of same length), or matrices (of same dimensions). Calculate the following three equations and assign the results to the output arguments. Sample Output >> [s, t, u] = Masood_Ejaz_Ex15 (1,2,3) 81.4228 4.0009 1.3061e+03
Q: After learning the history of computer and the different computer generations, I want you to choose ...
A: - Solving the first three subparts according to the guidelines. - We have to talk about facebook. - ...
Q: 1 Create a class called Citizen with the following attributes/variables: a. String citizenID b. Stri...
A: #include<bits/stdc++.h> using namespace std; class Citizen { public: String citizenID,citizenN...
Q: ProcessBurst Time Priority Arrival Time P1 10 3 0 ...
A: Shortest Job First:- The Shortest Job First is one of the scheduling algorithms in the CPU where the...
Q: ontrast and compare an application programming interface (API) and an application binary (ABI)
A: It's worth noting that the word 'interface' appears in its name. An API is a type of interface, but ...
Q: he following recursion occurs when there are more than two calls for each non-base case: : c)Multip...
A: SUMMARY: -Hence, we discussed all the points.
Q: Design a combinational circuit that accepts a 4-bit number and generates a 3-bit binary number outpu...
A: Sequential model: This NAND gate is a physical circuit during which the output is determined by the ...
Q: n the computer world, who is known as the "father" of the Intel Pentium chip?
A: Answer the above questions are as follows:
Q: Computer Science T(n) = T(n-3) + n using chip and conquer method
A:
Q: ProcessBurst Time Priority Arrival Time P1 10 3 0 ...
A: Check further steps for the answer :
Q: 3. What issues are significant when assessing the relative merits of different sorting algorithms? C...
A: INTRODUCTION: We need to answer the 3rd question.
Q: 20. Which of the following two data manipulation operators, AND and OR, will retrieve the most recor...
A: The employees table CREATE TABLE employees ( empid INTEGER PRIMARY KEY, empname TEXT NOT NULL, ...
Q: A narrative that describes how paying the monthly bills (any bill that you have to pay), including a...
A: Check further steps for the answer :
Q: Which of the following statements is not true if f(n) is O(g(n)): a)f(n) grows more c)f(n) and g(n...
A: The answer is
Q: Problem 5 :Recursion Tree Time Complexity Find the Worst case time Complexity of the following recur...
A: as per company guidelines, if multiple quesions posted then only first question answer can be given....
Q: how would I do this Return a list of all properties where service requests are made with different N...
A: We must return the Service-request table, which contains requests for the same property with differe...
Q: Using My SQL Workbench Find all cities in Argentina whose name begins with S or M a. display city na...
A: Logic:- To display names that begins with any character , use like operator and put first character...
Q: The ubiquitous nature of mobile phones today brings tremendous convenience to our lives, but will mi...
A: In today's world of advanced information and technology, mobile phones and devices are being extensi...
Q: Classify each of the following attack situations to one of the main attack types (interception, inte...
A: An attack is an intrusion that is caused to a certain system. It can be caused by the malicious mind...
Q: Write a C program to calculate the parking fare for customers who park their cars in a parking lot w...
A: Actually, program is an executable software that runs on a computer.
Q: There are many different types of algorithms for this, but what is one?
A: Introduction: Classification in Machine Learning: Machine learning can be defined as a method throug...
Q: Computer Ścience The language used here is C++ Develop a C program that processes a file called "gra...
A: The file is opened using the method in C, which is fopen(). The file needs to be saved in the same f...
Q: By running one or two SQL statements, answer the following questions one by another. Load the MariaD...
A: Lets see the solution in the next steps
Q: List the five jobs that the records and information manager must do, in order.
A: Introduction: => Information managers(IM) oversee and implement organization-wide information ...
Q: ) Define the term of methodologies, techniques, and tools?
A: Methodologies, tools and techniques are different terms, although they look similar but meaning of e...
Q: What does the Maple command mean?
A: From simple calculations to complicated computations, visualizations, data analysis, and algorithm d...
Q: Write a function double lagrange(double x_int[], double y_int[], int n, double x) which calculates t...
A: // C++ program for implementation of Lagrange's Interpolation #include<bits/stdc++.h> using na...
Q: Algorithms are used by computers to do things.
A: INTRODUCTION: ALGORITHM: An algorithm may be thought of as a sequence of planned sequential instruct...
Q: Describe how nonpreemption in the implementation of fair queuing results in a different packet trans...
A: Introduction: The round-robin technique is a service that is a widely used algorithm for CPU and net...
Q: How can we reduce the transition time of a Bistable Multivibrator?
A: A Bistable Multivibrator has two stable states. The circuit stays in any one of the two stable state...
Q: do a linear search
A: Here by using C programming, we have to do linear search on a 2D array and should return memory addr...
Q: Networks 172.16.0.0/16, 172.20.0.0/16 and 172.23.0.0/16 can all be reached out of port S0/1/0 of a r...
A: For the given network as 172.16.0.0/16, 172.20.0.0/16 and 172.23.0.0/16 can all be reached out of po...
Q: Network Address 172.85.26.0/23 Chippendale LAN 12 Hosts Chippendale Ultimo LAN Glebe LAN 45 Hosts 85...
A: Given Network address is 172.85.26.0/23 IP address is 32 bits and 23 are network id bits. Host id bi...
Q: Find the error in each of the following code segments and explain how to correct it. а) x = 1; while...
A: a) x = 1; while(x <= 10); x++; } In this code we have several errors: x datatype is...
Q: 4. Perform array slicing to retrieve elements. Assume the array is arr=[1,2,3,4,5,6,7,8,9,10] a) Sli...
A: Note: Answering the first question(4) and in python as per the guidelines. Input : Given the array ...
Q: Data Structures and algorithms (Only using C/C++) note: Solve it using Structures 11. Find the lar...
A: Algorithm: Start Create a class named node which represents a node of linked list with data, next (...
Q: The question is whether society has become too reliant on computer applications for commerce, commun...
A: It is arguably true that the society has become too reliant on computer applications. If we look aro...
Q: Provide a description for WaitMsg.
A: Introduction: In Javascript, the waitMsg method is used to show a message while waiting for an event...
Q: 2. For the following pairs of functions, determine which function grows faster. f(z) = 6r3 – 5a2 +9,...
A: As we know if limit extends to infinite f(x)/g(x) = 0 ==> g(x) grows faster if limit extends to ...
Q: Some diseases cannot be spread unless there is a direct contact with the infected person. Using inf...
A: Code: #include <iostream> using namespace std;void contact(int p,int q,int a[]);int main(){ ...
Q: List several different programming languages which are procedural and nonprocedural. Which group is ...
A: A procedural programming language is a type of language that solves a specific problem by follo...
Q: John von Neumann came up with something.
A: Introduction: John von Neumann: John von Neumann was a fundamental contribution to the evolution of ...
Q: Encrypt the message ‘STOP’ using the RSA system with n = 53 • 61 and e = 17
A: INTRODUCTION: We are all aware that the RSA algorithm is a public essential encryption technique tha...
Q: 3. Find the Culprit by CodeChum Admin
A: the answer to the following question:-
Q: What style is better for use
A: Below are the leadership style and their advantages and disadvantages :- 1) Democratic leadership In...
Q: ləgunu u rerted to armatted
A: The program code provided below opens a file named number_file.txt and for each section that begins...
Q: Write an algorithm to insert an item into a sorted array
A: Assume that the array has free space for more elements. Algorithm1: Append the new value to be inser...
Q: Let L= [w€ {a,b.c)": na(w) = 1, ne{w) = 1] Which of the following NFAS accepts L? a) 93 q4 q5 96 b) ...
A: Given: L = {w belongs to{a,b,c}* : na(w)=q, nc(w)=1} number of a's in w are :1 number of c's in w ar...
Q: Create an ERD with the following Entities and Attributes. Entity: USERS - Attributes: Name of User,...
A: Create an ERD with the following Entities and Attributes. Entity: USERS - Attributes: Name of User, ...
Q: Implement and test a genetic algorithm method to approach TSPs. Solve in Python3. Solve for number o...
A: Discuss genetic algorithm method to approach . Solve in Python3. Solve for number of generations,...
Q: IDPSS have been added to IDS systems by a number of companies. Describe them.
A: Answer: In data centres, the cloud, and in the workplace, McAfee Network Security Platform (NSP) s...
Step by step
Solved in 2 steps
- Write a function that displays an n-by-n matrix using the following header: void printMatrix(int n)Each element is 0 or 1, which is generated randomly. Write a test program that prompts the user to enter n and displays an n-by-n matrix.Q2: In this question, you will write a Python function to compute the Hadamard product of two matrices. The Hadamard product is the "component-wise" product of two matrices. That is, each entry of the product matrix is equal to the product of its corresponding entries of the input matrices. Here is an example: a11 a12 a21 a22 a23 a31 a13 SH a32 033 A b11 b12 b13 b21 b22 b23 b31 b32 b33. B = [an bu a21 b21 a31 b31 a12 b12 a22 b22 a32 b32 a13 b13 a23 b23 a33 b33. Hadamard product of A and B Write a Python function to compute the Hadamard product of two matrices as follows. a) The inputs to the function are two matrices. b) The function should check whether the two matrices have the same size. If not, it should print "The input matrices are not of the same size". c) If two matrices are of the same size, the function computes the Hadamard product and returns the answer. Use for loops to compute the Hadamard product.Write a function that sums all the numbers of the major diagonal in an nxn matrix of integers using the following header:def sumMajorDiagonal(m):The major diagonal is the diagonal that runs from the top left corner to the bottom right corner in the square matrix. Write a test program that reads a 4x4 matrix and displays the sum of all its elements on the major diagonal.
- Complete the function that calculates the sum of the first n+1 terms of the geometric series a, ar, ar² ar³, ar4 . note that the series begins with a and the last term is ar", in total there are n+1 terms. ar" ... [ ]: # complete the function given the variables a,r,n and return the value as series_sum. def sum_geometric_series(a,r,n): # your code here return series_sumUsing C language Write a function that determines standartdeviation of float array. The function takes dataset as afloat array parameter!! And it also return result as afloat.(Clue: calculate average first) Definations: in the image σ = standard deviationxi = each value of dataset? (with a bar over it) = the arithmetic mean of the data(This symbol will be indicated as average of dataset)N = the total number of data points(if you need square root of some number you can use sqrtfunction in math.h library. Usage example: a=sqrt(b);which means “a” is equal to square root of “b”)Complete this code using Python m1 = [] #Matrix 1m2 = [] #Matrix 2#Write a function that will return the addition of Matrix A and B.#Create a new matrix C that will hold the addtion result of Matrix A and B (A+B).#Return the resultant matrix Cdef addMatrix(A,B):#Write your code here#Write a function that will return the subtraction of Matrix B from A.#Create a new matrix C that will hold the substraction result of Matrix B from A (A-B).#Return the resultant matrix Cdef subsMatrix(A,B):#Write your code here#Write a function that will return the multiplication of Matrix A and B.#Create a new matrix C that will hold the multiplication result of Matrix A and B (A*B).#Keep in mind,in order to perform matrix multiplication, the number of columns in Matrix A must be equal to the number of columns in Matrix B. #Return the resultant matrix Cdef multipyMatrix(A,B):#Write your code here#Write a function that will transform matrix A to the transpose of matrix A.#The transpose of a matrix means…
- Mdt ɔɔ 9Create the matrix (M) below using as little code as possible. You should use multiple built-in functions. M= 6.0000 19.5000 33.0000 6.0000 19.5000 33.0000 9.0000 9.0000 9.0000 9.0000 9.0000 9.0000 5.0000 -1.0000 -7.0000 5.0000 -1.0000 -7.0000 6.0000 19.5000 33.0000 6.0000 19.5000 33.0000 9.0000 9.0000 9.0000 9.0000 9.0000 9.0000 5.0000 -1.0000 -7.0000 5.0000 -1.0000 -7.0000 Now within the script use MATLAB commands to make the following changes to the matrix. Include comments in your script to separate the parts. a. Change the four numbers in the center of matrix M to one. b. Divide the bottom half of the matrix by 4. c. Multiply the top half of the matrix by 4. d. Delete the last column of the matrix. e. Create a new matrix C from first, third, and fifth column of the second and fourth rows of M. f. Sort each column of C in descending order. Calculate the following equation: 45 C* + C D=-function [P, A] = rect(L, W) P= 2 (L+ W); A =L*W; end Above function is defined to find perimeter and area of a rectangle. If a rectangle has length 10 mm and width 7 mm then the correct way to get perimeter and area of a given rectangle by executing this function is Select one: a. [A, B] = rect(10, 7) b. rect(7, 10) c. [A, B] = rect(7, 10) d. rect(10, 7)Complete the function that adds 3 matrices together. The matrices will be numpy type and of the same dimension of 3 x 3. There are several ways to do this, any correct answer will be accepted. [ ] # add the matrices a,b,c together, these will have #been passed to the function # as standard numpy matrices. Rememeber if you #are unsure, just print the # elements to see how to access the matrix values. # there are several ways to do this, anyway #you do this is fine import numpy as np def add_matrices (a,b,c): # initiate the matrix based on the assumption #that the matrix is 3x3. matrix = np.zeros([3,3]) # YOUR CODE HERE return matrix ## Check your code below using print command ## Random matrices are created here for checking ##your function a = np.array([[3,2,1],[1,1,1],[1,1,1]]) b = C = np.array([[3,2,1], [2,2,2], [2,2,2]]) np.array([[3,3,3], [3,3,3], [3,3,3]])
- Jupyter Notebook Fixed Income - Certicificate of Deposit (CD) - Compound Interest Schedule An interest-at-maturity CD earns interest at a compounding frequency, and pays principal plus all earned interest at maturity. Write a function, called CompoundInterestSchedule, that creates and returns a pandas DataFrame, where each row has: time (in years, an integer starting at 1), starting balance, interest earned, and ending balance, for an investment earning compoundedinterest. Use a for(or while) loop to create this table. The equation for theith year's ending balance is given by: Ei =Bi (1+r/f)f where: Ei is year i's ending balance Bi is year i's beginning balance (note: B1 is the amount of the initial investment (principal) r is the annual rate of interest (in decimal, e.g., 5% is .05) f is the number of times the interest rate compounds (times per year) The interest earned for a given year is Ei - Bi Note the term of the investment (in years) is not in the above equation; it is used…There is only 1 ques with 2 part. Please answer the questions ( Answer in python ) Part I: Cities. Write a function called describe_city which accepts the name of a city and its country. The function should print a simple sentence as shown in the output example. Give the parameter for the country a default value. Make 5 calls to the function using the following arguments: Reykjavik, Iceland Pittsburg Ontario, Canada Cairo, Egypt Miami, USA Output Example : ( FOLLOW THE OUTPUT SAME AS GIVEN BELOW ) Reykjavik is in Iceland Pittsburg is in USA Ontario is in Canada Cairo is in Egypt Miami is in USA Part II: Blastoff!!! Write a function called count_down which has 1 integer parameter. The function should countdown from that parameter value to 1. Each step in the countdown should be printed on the same line followed by ‘Blastoff!!!’ also on the same line. All of this should happen in the function. Make 3 calls to the function with the following arguments: 3 5 10 Output…Write a function that use array (y) to print the result in the figure. Then write only the call statement to call the function. y = -3 4 0 -1 5 -6 2 8 10 -4 Location of negative numbers: 0 --> -3 3 --> -1 5 --> -6 9 --> -4