Activities 1. Transform a 1-D array into 2-D array with 3. Start with: Al = np.array ([1, 2, 3, 4, 5, 6, 7, 8,9 ]) Your code: Ideal Output: eug ol que sus [[1, 2, 3] [4, 5, 6] [7, 8, 9]] bebulani Jon) Jegensebna odf mon xobni of br ( obni of
Q: Several gaps should be bridged to reach a successful implementation of e.government services, except...
A: Several gaps should be merged for reaching successful implementation of government service as nowada...
Q: Soon soon please please Write a MIPS assembly program-snippet (i.e., minimal code that accomplishes ...
A: Source code of the program is given below.Detailed comments are included for better understanding th...
Q: 5. My Sincere Apologies (C PROGRAMMING ONLY) by CodeChum Admin Okay, I don't know what got into me ...
A: The code is given below #include <stdio.h>void sendApology(char , int );int temp =1;int mai...
Q: What is the output of the following program? Explain why?
A: Program Explanation: Define a class for boy with the instance variable age having a default value o...
Q: g functions, write and submit the source codes that will solve the given problems. BLEM 1: Create a ...
A: Lets see the solution.
Q: shell program to get mark details of a student and display total and grade? Write a shell program to...
A: Write a shell program to get mark details of a student and display total and grade? In this program ...
Q: The data structures help mostly to: b)Debug programs c)Create inheritance hierarchies a)Organize ...
A: The data structures help mostly to:
Q: You must justify your answers. – The answers should be concise, clear and neat. – When presenting ...
A: Algorithm: To find no. of paths from s -> t in O(|V|+|E|) time: 1. Perform DFS while marking the ...
Q: Write a program to read 3 numbers, and write the largest and smallest numbers.
A: The above pogram written in c++ languange and is answered in next step in next step i ask user to in...
Q: Router priority is based on the following: Group of answer choices loopback0 address ip address rout...
A: An IP address is a unique address that identifies a device on the internet or a local network.
Q: Overview The objective of this assignment is to demonstrate an ability to implement inheritance, c...
A: #include <iostream> #include <cstdlib> #include <cctype> #include <algorithm>...
Q: Multiple Calls (C PROGRAMMING ONLY) by CodeChum Admin After not being so clear with what I wanted...
A: As per the requirement program is written. Algorithm: Step 1: Write main() method Step 2: Write two ...
Q: 16.a. How far can workstations be separated in an FDDI network? A. 100 km B. 50 km C. 15 km D. 2 km ...
A: 16 .a) FDDI supports a variety of fiber optic cable types, including the 62.5/125 micron multimod...
Q: Implement the SHIFT ROWS and the SUBSTITUE BYTES AES procedures in any high-level programming langua...
A: Below i have given code in c:
Q: Write an algorithm and flowcharts for the following: a. Sum the even numbers for n numbers.
A: As per our guidelines we are suppose to answer only first question. Kindly repost other question sep...
Q: Design a method random_key() that returns a random key from BST in time proportional to the tree hei...
A: The Full form of BST is Binary Search Tree.
Q: Q2 answer needed 1.1. Write a permutation of 9 integers which is not in sorted order. Sort the inte...
A: The answer is given below.
Q: ain how communication occurs across a local Ethernet network? You must include detail on the Etherne...
A: Lets see the solution.
Q: Write a Java program StringProg which creates a Scanner and then does the following: 1. Ask the user...
A: NOTE: Attempting only the first four subparts as per the guidelines. First, we will create the scan...
Q: Explain the management of innovation and give an example of how a firm can manage innovation process...
A: Process innovation: Any handling of an organization's development method, from the first step of ide...
Q: Algorithm PARTITION(A, P, q) D A[p.…q] x- A[p] 1 D pivot = A[p] 2 for j – p+ 1 to q do if A[j] < x t...
A: Hi there, Please find your solution below, I hope you would find my solution useful and helpful. Tha...
Q: The function f(n)= 1000 n2+ n3 + 1 is O(1) O(log n) d. O(n log n) а. О(n) Ос. c. O(n³ ) Ob. O b. O(n...
A: The time complexity of the given function i.e. 1000 n2 +n3 +1 is O(n3) i.e. option e.
Q: Project Requirements Due week 8 (Mar 9) – 20% You are given a database containing Customer, Service,...
A: Due to company policies I am compelled to solve only 1 question that is the first question. Please p...
Q: Use Linux executable objectCode6 for this question. These files are on syccuxas01.pcc.edu in directo...
A: The value that will be in ST(0) is log(base2) 10 i.e. option B is correct.
Q: The encoding of the 'Loop target' instruction has: K the full hcx addrcss of the label targct O nonc...
A: Loop Target : Loop target is used to define the location of the condition that is needed to be chec...
Q: rite an 8051 assembly language program to determine if a sequence of bytes is a palendrome. The numb...
A: A palindrome is the string that is read from the front and back are read as the same. Program explan...
Q: Write a Java program that determines the number of odd, even, and zero digits of an input integer. F...
A: import java.util.Scanner; /**** @author Namburi Ramesh*/public class OddEven {public static void mai...
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: How do you find something in an unorganised way? You look at every single thing that's there until y...
A: Introduction: Inspections are the process of inspecting or examining data, information, items, and t...
Q: What information is included in the header?
A: Information is included in the header.
Q: Which of the following is the correct relational model of the entity Judge (ignore foreign key due t...
A: The correct relational model of the entity Judge will be (C) JUDGE ( JudgeID(PK), Name, YearPractic...
Q: A U (B n C) = (A U B) n (A U C)
A: Given :- Prove the following equivalence using VENN DIAGRAMS
Q: For each of the following subnet masks used in class A, Class B and Class C. Find the number of 1s t...
A: Network Interface Standards Diagram Blinds: The procedure of routing is the division of a wide numbe...
Q: Use the Monte Carlo method to estimate the following. 1 1. lo' exp(exp(x)) dx 2. E(N) where N is def...
A: Given The answer is given below.
Q: Discuss where you would use: Crossover, Rollover and Straight through cables. Explain crossover, ro...
A: Discuss where you would use: Crossover, Rollover and Straight through cables. Explain crossover, rol...
Q: (Addressing) In Joe's program, what will be the value of ebx after execution? ; loe's program data y...
A: Here DWORD is pointing to My words and will copy 32 bit of content from My words to ebx thus it will...
Q: In the code editor, you are provided with an initial code in the main() that asks the user for the e...
A: #include <stdio.h> void flex2D(int[][5]);int main() { int matrix[5][5]; printf("Ente...
Q: Perform the multiplication of the 4-bit number 1011 (multiplicand) with 1001 (multiplier) using the ...
A: Perform the multiplication of the 4-bit number 1011 (multiplicand) with 1001 (multiplier) using the ...
Q: Draw a flowchart that takes a number input from the user and checks if the number is even. If even i...
A: Flowchart:- It is a pictorial or diagrammatic representation of an algorithm using standard symbol...
Q: Create a class called Matrix that represents a 3x3 matrix. This matrix contains a two-dimensional in...
A: Algorithm: Start Create a class named Matrix with a 2d integer array 'a' of size 3x3 as an attribut...
Q: Who was the first to create the flash drive?
A: Introduction: Flash drives are portable storage devices. Almost every college student carries a flas...
Q: Design and implement a getLastHalf() method for the MyLinkedList class. The method should return the...
A: Program Explanation: Define a class for implementing the linked list Define a static class for no...
Q: Given sets A and B, to prove that (A − B) ∪ (A ∩ B) ⊆ A, we suppose that x ∈ ______ and we must show...
A: Answer is given below
Q: Hello! I am having trouble on how to write out the Java code based on the instructions (in bold //**...
A: entire code with comment is given in step 2.
Q: Explain how TCP’s version of the sliding window protocol helps both manage congestion in the network...
A: Sliding window protocol can be defined as the technique that is used by transmission control protoco...
Q: Encrypt the message ‘STOP’ using the RSA system with n = 53 • 61 and e = 17.
A:
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: The question is whether society has become too reliant on computer applications for commerce, commun...
A: Introduction: Application for Computers: The term "computer application" refers to a piece of softwa...
Q: epresented by elements on a grid of squares, where a grid has an ar
A:
Q: What is the worst-case time complexity of the function that determines efficiently if an item exists...
A: In the worst-case analysis, we calculate the upper bound on the running time of an algorithm.
Step by step
Solved in 3 steps with 1 images
- //convert array of numbers from farenheit to celcius// example:// argument: [23, 32, 41, 50, 59]// return: [-5, 0, 5, 10, 15]// hint: use Array.mapfunction toCelcius(array){ } //write a function that takes an input array and returns an array of booleans (>=75) or fail (<75)// example:// argument: [20, 30, 50, 80, 90, 100]// return: [false, false, false, true, true, true]// hint: use Array.mapfunction passOrFail(array){ }/*Code: Construct BST From Sorted ArraySend FeedbackGiven a sorted integer array A of size n, which contains all unique elements. You need to construct a balanced BST from this input array. Return the root of constructed BST.Note: If array size is even, take first mid as root.Input format:The first line of input contains an integer, which denotes the value of n. The following line contains n space separated integers, that denote the values of array.Output Format:The first and only line of output contains values of BST nodes, printed in pre order traversal.Constraints:Time Limit: 1 secondSample Input 1:71 2 3 4 5 6 7Sample Output 1:4 2 1 3 6 5 7 */public class SortedArrayToBst { /* Binary Tree Node class * * class BinaryTreeNode<T> { T data; BinaryTreeNode<T> left; BinaryTreeNode<T> right; public BinaryTreeNode(T data) { this.data = data; } } */…Code for this in C: You have created three arrays:array A of size 100array B of size 50array C of size 200You are to store the first 100 numbers (1,2,3,...,100) into array A, the first 50 positive odd numbers (1,3,5,...,) into array B, and the reciprocal of each position [C(5) = 1/5] into array C. Then, output the contents of each array.
- In main() for now: do these - one at a time, each in it's own loop (we will make functions out of them later –Declare an array RandArray with 20 integers –Assign each of the 20 values with a random value from 0 to 99 Hint: Use rand()%100 For mimir: Do not call srand at the top of main. // normally: Call srand(time(0)) at the top of main –(you need #include<cstdlib>) –Write another loop that prints the array, with index values Important: If the output values do not match mimir, please add srand(17); // inside your main function - at the top code format: #include <iostream>using namespace std; #include <cstdlib> // required for rand() int main(){ srand(17); // define a constant ARRAYSIZE that is 20 // declare randArray // set the 20 elements in randArray to be a random number between 0 and 99 // hint: use rand()%100 // print the 20 values return 0;}Integer numElements is read from input and represents: • The number of elements in each array. The number of pairs of integers read from input. Declare two integer arrays, houselds and serviceCosts. Then, read each pair of integers from input. For each pair read, store the first integer into houselds and the second integer into serviceCosts. Ex: If the input is: 4 3 29 9 12 8 18 5 46 then the output is: House id: 3, Costs: $29 House id: 9, Costs: $12 House id: 8, Costs: $18 House id: 5, Costs: $46 1 import java.util.Scanner; 2 3 public class CashRecords { 4 5 16780 O 9 public static void main(String[] args) { Scanner scnr= new Scanner (System.in); int numElements; int i; numElements scnr. nextInt (); /* Your code goes here */ for (i = 0; i< numElements; ++i) { System.out.println("House id: + houseIds[i] + ", Costs: $" + serviceCosts [i]); 10 11 12 13 14 15 16 } 17 } }3. Implement a function called findLargestIndex which returns the index of the rowwith the largest sum.ex. int array[3][6] = {{3, 6, 8, 2, 4, 1}, // sum = 24{2, 4, 5, 1, 3, 4}, // sum = 19{1, 0, 9, 0, 1, 0}}; // sum = 11If the findLargestIndex function was called using this array, it would return 0, asit is returning the index of the row, not the sum.Note that the number of columns is required when passing a 2d array to a function.Assume that 2D arrays passed to this function will have 6 columns.Title line: int findLargestIndex(int array[][6], int rows, int columns);
- Java Program - Functions with 2D Arrays Write a function named displayElements that takes a two-dimensional array, the size of its rows and columns, then prints every element of a two-dimensional array. Separate every row by a new line and every column by a space. In the main function, write a program that asks for integer input to be assigned on a 3 x 3 array and call the function displayElements to print the contents on the next line. Input 1. Multiple lines containing integer each line Output R1C1: 1 R1C2: 2 R1C3: 3 R2C1: 4 R2C2: 5 R2C3: 6 R3C1: 7 R3C2: 8 R3C3: 9 1 2 3 4 5 6 7 8 9Java Objective:Design and implement simple matrix manipulation techniques.Details:Your java program should use 2D arrays to implement simple matrix operations.Your program should do the following:• Read the number of rows and columns of a matrix M1 from the user. Use an input validation loop to make sure the values are greater than 0. • Read the elements of M1 in row major order• Print M1 to the console; make sure you format as a matirx• Repeat the previous steps for a second matrix M2• Create a matrix M3 that is the transpose of M1 and print it to the console• Check if M1 and M2 can be added (should have the same dimensions). If possible, add M1 and M2 and print the result to the console. Otherwise print an error message.• Multiply M1 and M2 if possible and print to the console. If the matrices cannot be multiplied, print an error message. Implementation requirements:• Use a helper method for reading a positive integer using an input validation loop.• Use a helper method for printing…Write code that loops through the array myVals. Each iteration: If myVals[i] is less than smallestNum, assign smallestNum with myVals[i]. Remember to assign smallestNum with some value before the loop.
- A left rotation operation on an array of size n shifts each of the array's elements 1 unit to the left. Given an integer, d, rotate the array that many steps left and return the result. Example:d=2arr=[1,2,3,4,5] After 2 rotations, arr'=[3,4,5,1,2]. Function Description: Complete the rotateLeft function in the editor below. rotateLeft has the following parameters: 1. int d: the amount to rotate by 2. int arr[n]: the array to rotate Returns 1. int[n]: the rotated array Input Format: The first line contains two space-separated integers that denote n, the number of integers, and d, the number of left rotations to perform.The second line contains n space-separated integers that describe arr[]. Constraints: 1. 1<=n<=10^5 2. 1<=d<=n 3. 1<=a[i]<=10^6Answer in java script Create a function that returns true if the first array can be nested inside the second. arr1 can be nested inside arr2 if: 1. arr1's min is greater than arr2 's min. 2. arr1's max is less than arr2 's max. Examples canNest([1, 2, 3, 4], [0, 6]) true canNest ([3, 1], [4, 0]) → true canNest ([9, 9, 8], [8, 9]) → false canNest([1, 2, 3, 4], [2, 3]) - falsePrompt: In Python language, write a function that applies the logistic sigmoid function to all elements of a NumPy array. Code: import numpy as np import math import matplotlib.pyplot as plt import pandas as pd def sigmoid(inputArray): modifiedArray = np.zeros(len(inputArray)) #YOUR CODE HERE: return(modifiedArray) def test(): inputs = np.arange(-100, 100, 0.5) outputs = sigmoid(inputs) plt.figure(1) plt.plot(inputs) plt.title('Input') plt.xlabel('Index') plt.ylabel('Value') plt.show() plt.figure(2) plt.plot(outputs,'Black') plt.title('Output') plt.xlabel('Index') plt.ylabel('Value') plt.show() test()