Please generate a special 8 by 8 square matrix that has ones in the first row and first column, and whose remaining elements are generated in the following way. If the sum of the element above and the element to the left is less than 30, this element is equal to the sum. Otherwise, the element is the minimum of those two element values. 1) Use the for loop and if structure to write a user-defined function to generate this special matrix. 2) Determine how many elements are greater than 5 and less than 20 in this special matrix.
Q: Supporting a travel agency, TORS maintains tour information and provides reservation facilities for…
A: The correct answer for the above question is given in the following steps for your reference.
Q: Fredwick wants a program in which he can continuously enter some positiv integer values and the…
A: Please find the answer below :
Q: 3. Explain the impact digital technology has had on assistive devices for people with physical…
A: The answer of the question is given below:
Q: A stage of an n x n banyan network consists of (n/2) 2 × 2 switching elements. The first stage…
A:
Q: What is prefetching?
A: Introduction In this question, we are asked what is prefetching.
Q: =) Find the moment of inertia of a hollow cylinder about the axis of the cylinder using a AVA…
A: CODE: import java.util.*; public class test { public static void main(String[] args) {…
Q: 1. A container that is characterized by having individual nodes that consist of a data part and 2…
A: Ans: 1 b is correct ; ( A linked list ) first of all you need to understand the definition of…
Q: The capacity of a cut is defined as the sum of capacities of nodes that composes the cut. O True…
A: Answer is explained below:
Q: 11. Mr. X wants to send a message that contains a word to Mr. Y through the internet. The message…
A: We need to write a Java code for the given scenario.
Q: your code does not run Exception Handling correctly like shown in my 2nd picture . Can you please…
A: Modified code: def getCorrectAnswers(): # Storing correct answers correctAns =…
Q: Bound the backward error in approximating the solution to 2 1 X1 [ ³ + ][ * ] - [ 25.35 ] by x = [ 3…
A:
Q: 1. What is IP address? The history etc. 2. What is IPv4 and IPv6? The features, packet structure,…
A: What is IP address? The history. What is IPv4 and IPv6? The features, packet structure, limitations,…
Q: Case problem: Create a program that will input 4 numbers and display the SUM, DIFFERENCE, PRODUCT…
A: Arith.cpp Source Code: #include <iostream>using namespace std;int main(){int…
Q: Consider transferring an enormous file of L bytes from Host A to Host B. Assume an MSS of 536 bytes.…
A: Here we have given solutions to the multiple questions asked. you can find the solution in step 2.
Q: We have said that an application may choose UDP for a transport protocol because UDP offers finer…
A: a. With TCP, the application writes data to the connection send buffer and TCP will grab bytes…
Q: Show all steps of the algorithm.
A: A Spanning Tree is a tree (directed or undirected) that connects all the nodes in a graph, and the…
Q: Explain the impact digital technology has had on assistive devices for people with physical…
A: An assistive device is a device, product or system that improves the work, learning and daily life…
Q: 1. Use C PROGRAMMING LANGUAGE ONLY 2. Use RECURSION type of program 3. Copy and paste your code(no…
A: Program: #include <stdio.h>int quotient(int a, int b){ return a / b;} int main(){ int…
Q: Given the MileageTrackerNode class, complete main() in the MileageTracker LinkedList class to insert…
A: Here is Java code : //MileageTrackerLinkedList.java import java.util.Scanner; public class…
Q: Implement a method called has22, which inputs a list of ints, returns True if the array contains a 2…
A: Introduction: Algorithm: Define a function with the parameter num. Initialize the variable i to 0.…
Q: 3. Translate the statement, "There is a student who neither attends class nor submits…
A: We are given a statement in English: "There is a student who neither attends class nor submits…
Q: Define and explain in detail, your favourite mathematical theorem. Note - Minimum word requirement…
A: The question has been answered in step2
Q: Complete this program so that it will produce the output below. (Hint: Overload the << operator)
A:
Q: Remove all errors from the C++ program given below as #include using namespace std; int main(){ int…
A: Here is all the errors and fixed code:
Q: Modify the turtle footprint below to complete the following tasks: • Create a 1-minute turtle…
A: ANSWER:-
Q: a. Bob claims that he can receive a complete copy of the file that is shared by the swarm. Is Bob's…
A: A. Yes. His first claim is possible, as long as there are enough peers staying in the swarm for a…
Q: What do you mean by inline function?
A: answer is
Q: What strings are generated by the following regular expressions, defined over the alphabet Σ = {a,…
A: 1. Given regular expression is, (a +b)*c (a+b)* means it contains all the strings that are possible…
Q: Instruction: Create a java program that generates elements (randomly from 10-75) of a 2-dimensional…
A: Logic :- (I) To generate random number in range:- arr[i][j]= Min + (int)(Math.random() * ((Max -…
Q: write Pattem. a Python program to print the A BC DEF GHIJ KLMNO PQRSTU VW X Y Z CY
A: Python is the programming languages and it is consider as the a high-level, interpreted,…
Q: Explain a practical scenario why split tunneling is used
A: the above question that is practical scenario why split tunneling is used is answered below step.
Q: DHCP Client DHCP Discover -Fa0/0- .2 192.168.12.0/24 R1 -Fa1/0- .2 192.168.23.0/24 DHCP Server
A: Introduction: Automatic distribution and assignment of IP addresses, default gateways, and other…
Q: of 5/e5/e using
A: What is the Floating point form of 5/e5/e using 55 digit rounding ?
Q: A palindrome is a word or a phrase that is the same when read both forward and backward. Examples…
A: Here is the python of above pelindrome program. The code working perfect. See below steps.
Q: Assume that class B is derived publicly from class A. Class A has two functions, f1() and f2().…
A: Dear Student, A member function that is declared in a base class and redefined (overridden) by a…
Q: Read integers from input and store each integer into a vector until 0 is read. Do not store 0 into…
A: Read integers from input and store each integer into a vector until 0 is read. Do not store 0 into…
Q: What happens when a TCP based packet exits a NAT firewall
A: A Network Address Translation firewall operates on a router to protect the private network. It works…
Q: Explain a practical scenario why split tunneling is used
A: It improves internet speeds by alleviating bottlenecks and conserving bandwidth because all your…
Q: Consider a relation schema R = (X, Y, Z) on which the following functional dependencies hold: {XY-Z,…
A: Here in this question we have given a relation schema R = (X, Y, Z) on which the following…
Q: In [COOK82], the author proposes that the PC-relative addressing modes be elimi- nated in favor of…
A:
Q: Play the following chord: I Lives: 7 I want this picture to be drawn cpp code drawing using OpenGL
A: #include <GL/glut.h> #include <GL/glu.h> #include <math.h> #include…
Q: write a code in paython language and take screenshot for the code and result to the following…
A: The Python code is given below with output screenshot
Q: What is the distinction between instruction-level parallelism and machine parallelism?
A: Instruction-level parallelism exists when instructions in a sequence are independent and thus can be…
Q: Compute a QR decomposition of the matrix 3 3 [3}} 1 using (a) a Givens rotation, (b) Gram-Schmidt…
A:
Q: i) Fill in the missing words in the gaps of the following text: “ In wired LANs, the de facto…
A: (i) The answers for the gaps numbered A to H are given below: (A) Media Access Control (MAC) (B)…
Q: Encode oevopov with Huffman coding. a. List all symbols and their probabilities b. Find the Huffman…
A:
Q: Design an 8-4-2-1 BCD code converter to drive a seven-segment indicator.
A:
Q: Write a complete C++ program that asks the user to input information for at least 10 students. Use…
A: created a Student information system using an array using a structure below:
Q: Implement one of the following sorts of your choosing to reorder values from least-to-greatest (i.e.…
A: The following shows the implementation of bubbleSort, selectionSort and insertionSort using Java…
Q: Given a hard drive with the following characteri 1024 B sector 15,000rpm 4 ms average seek time…
A: The rotational speed is 15000 rpm That is, 15000 rotation 60 second 1 rotation x…
Step by step
Solved in 3 steps with 1 images
- Create a function named mat_desc() that througouhly describes a matrix, it should: Displays the shape, size, and rank of the matrix. Displays whether the matrix is square or non-square. Displays whether the matrix is an empty matrix. Displays if the matrix is an identity, ones, or zeros matrix Use 5 sample matrices in which their shapes are not lower than (3,3). In your methodology, create a flowchart discuss the functions and methods you have done. Present your results in the results section showing the description of each matrix you have declared.Python problem Problem StatementDevelop a function that receives an array and returns a tuple with its dimensions. EntryMultiple lines, each line contains a list of numbers separated by a space and this line corresponds to a row in the matrix. At the end of the array, the character "*". DepartureThe dimensions of the matrix in a tuple, (m, n) where m are the rows and n the columns. If it is not a valid array, the word "Error" must be printed without quotes. Examples of Input example 1 8 4 3 2 6 9 7 14 4 1 2 5 6 1 31 1 2 2 3 4 5 60 3 4 6 0 2 4 8*Output example 1 (4, 8) Input example 2 1 6 8 9 5 4 1 2 5 4 8 25 3 5 6 9 8 2 9 6 3 4 66 2 4 8 6 9 1 0 3 61 2 3 4 5 6 7 8 9 1 1 2*Output example 2 ErrorMatrix Addition• Write an addition function that accepts two 2D numpy arrays, andreturns the sum of the two (if they are the same size). This functionshould test that the arrays are the same size before performing theaddition. If the arrays are not the same size, the function shouldreturn -1. solve in python
- Matrix Multiplication• Write a multiplication function that accepts two 2D numpy arrays,and returns the product of the two. This function should test that thearrays are compatible (recall that the number of columns in the firstmatrix must equal the number of rows in the second matrix). Thisfunction should test the array sizes before attempting themultiplication. If the arrays are not compatible, the function shouldreturn -1. solve in pythonuse C++ programming language Write a modular program that analyzes a year’s worth of rainfall data. In addition to main, the program should have a getData function that accepts the total rainfall for each of 12 months from the user and stores it in an array holding double numbers. It should also have four value-returning functions that compute and return to main the totalRainfall, averageRainfall, driestMonth, and wettestMonth. These last two functions return the number of the month with the lowest and highest rainfall amounts, not the amount of rain that fell those months. Notice that this month number can be used to obtain the amount of rain that fell those months. This information should be used either by main or by a displayReport function called by main to print a summary rainfall report similar to the following: 2019 Rain Report for Springdale County Total rainfall: 23.19 inches Average monthly rainfall: 1.93 inches The least rain fell in January with 0.24 inches. The most rain…Q3: a- Write a program to pass a two dimensional square matrix as a parameter to a function; this function is used to convert the elements of the first row of the matrix to the average elements of the second and fourth rows; finally display the matrix after change.
- Use C++ programing language Write a modular program that analyzes a year’s worth of rainfall data. In addition to main, the program should have a getData function that accepts the total rainfall for each of 12 months from the user and stores it in an array holding double numbers. It should also have four value-returning functions that compute and return to main the totalRainfall, averageRainfall, driestMonth, and wettestMonth. These last two functions return the number of the month with the lowest and highest rainfall amounts, not the amount of rain that fell those months. Notice that this month number can be used to obtain the amount of rain that fell those months. This information should be used either by main or by a displayReport function called by main to print a summary rainfall report similar to the following: 2019 Rain Report for Springdale County Total rainfall: 23.19 inches Average monthly rainfall: 1.93 inchesC code Blocks Write the complete function that receives a pointer to the array's first element as an argument and multiplies the third element of the array by 10. Define your function in the same way as the given function prototype. Take a look at the "For example" below to see how the function is used in the main function and the expected result. #include <stdio.h>#include <stdlib.h>void multiplyElement(int *ptr);int main(){ int array[5] = {1,2,3,4,5}; int *arrPtr = NULL; arrPtr = &array[0]; multiplyElement(arrPtr); for(int i = 0; i < 5; i++){ printf("%d ", array[i]); }return 0;}//Your answer starts here For example: Test Result int array[5] = {1,2,3,4,5}; int *arrPtr = NULL; arrPtr = &array[0]; multiplyElement(arrPtr); for(int i = 0; i < 5; i++){ printf("%d ", array[i]); } 1 2 30 4Corner Case Write a function called corners that takes a matrix as an input argument and returns four outputs: the elements at its four corners in this order: top left, top right, bottom left and bottom right. (Note that loops and if-statements are neither necessary nor allowed as we have not covered them yet.) See an example run below: > [a, b, c, d] = corners([1 2; 3 4]) a = 1. 2 C = 3 4 Function e A Save C Reset MATLAB Documentation 1 Code to call your function e C Reset 1 A = randi(100,4,5) 2 [top_left, top_right, bottom_left, bottom_right] = corners (A) 3 B = [1; 2] 4 [top_left, top_right, bottom_left, bottom_right] = corners (B)
- (Numerical) Given a one-dimensional array of integer numbers, write and test a function that displays the array elements in reverse order.user defined and a value which you (function may be needs want Write a C function that take an array to find in the array. more parameter to perform it) The function should check values of the array and if it find the same value in the array, it should return the position in the array (just first one). If there is no match, it should return "-1" Example: if array is {1,2,5, 3, 10, 5) and If the search term is "10" function must return 4, If the search term is "5" function must return 2, If the search term is "9" function must return -1, Note: Write whole c program.Declare 2D array whose size and elements must be according to the desire of user then perform the following functions on it Display a lower triangular matrix. Find the sum of an upper triangular matrix. DO IT IN C++