Consider the following arrays: A = -1:1:1 B = -2:2:2 C = 0:1:2 What answer will the following commands produce in Octave? 1. C
Q: Consider the following cell array: c_array={41, 'a'; 1:2:8, 'hai'} which of the following command…
A: Explanation:-
Q: 10. Modify tmdb.cpp so that the program outputs two columns: run time, followed by title. The rows…
A: According to the information given:- We have to follow the instruction to performs the task.
Q: stomer cust = new Customer(name,address,phone); customers.add(cust); return cust; } public Car…
A: The parking lot should have multiple floors where customers can park their cars. The parking lot…
Q: Q12: Given x=[7 61 20-14 3-2 0] what are the commands that will execute the following operations: a.…
A: a. sets the negative values of x to zero. We can use the following comprehensions ,x=[0 if i<0…
Q: Given the following PHP code? 'Hamood Ali', 'did'=>'De1']; ?> Which one of the following statement…
A: Please find the answer below :
Q: Why My function browse () and order() don't work when I choose choice 2 or 6 ??? would you check it…
A: The problem that in the above code we donot have the cin so it will take the input Definition: CIN:…
Q: 2 iii) int a = 5; //L1 5; i <= 6; i++) //L2 for(int i { а %3D а + 3; //L3 //L4…
A: In this question, we have to trace the code and fill the given table. For loop will run recursively…
Q: 1 2 var a = 6; 3 var b =%3B %3D 4 var c = 0; 6 function mystery (num1, num2) { var a; 8. c = numl +…
A: Given: <script>var a = 6;var b = 5;var c = 0; function mystery (num1, num2) { var a; c = num1…
Q: Write a JavaScript program to read and analyse the assessment results of a unit under Node.js host…
A: Answer :
Q: Consider the following matrix: P = [3 6 9 12; 4 8 12 16; 3 6 9 12] What Octave command will…
A: P = [3 6 9 12; 4 8 12 16; 3 6 9 12] P(:,4)=2 disp("The Values after replacing the last column to 2")…
Q: a) The following main function and its output are given. Class Address has only one private static…
A: According to the Bartelby guidelines we are suppose to answer only one question at a time. Kindly…
Q: This array is declared in C++: double w[5] {-1.0, 6.2, 8.77, 3.49, 1.99}; What is the gdb command…
A: Given :
Q: Question Suppose you are creating a dictionary software which will allow users to search words and…
A: - We need to have the answer for the problems.
Q: Which of the hsplit() calls below will result in the arrays A, B and C having the values shown in…
A: I have given an answer in step 2.
Q: How do I extract data from a JSON Object? I am working on a project that requires me to extract the…
A: If you had to print out the whole answer every time, JSON wouldn't be too useful. Instead, you…
Q: Write a BASH SCRIPT or BASH COMMANDS. Make 2 arrays. One regular index array called array. One…
A:
Q: would you write a batch script/ Batch file for windows ( file.bat) to sort by column for a table…
A: Note: The output has provided in the most appropriate and understandable format. echo "Sort the file…
Q: Given the following arrays 1. $shop=['shCode'=>' Shl','shName'=>'lulu…
A: Given the code for sending managers data to the web browser from the managers array in dynamic radio…
Q: 5 Given a matrix A, then A(;2) is the 2nd column in A Select one: O a. False O b. True 6 The command…
A: Objective: Three multiple-choice questions are provided about the commands that are used in Matlab.…
Q: of stion Suppose you have an MS excel worksheet and R10# is a dataset of many rents and a simple…
A: since the given summary of R10# are sorted. All the data set in R10# are sorted values(rents)…
Q: would you write a batch script/ Batch file for windows ( file.bat) to sort by column for a table…
A: Since, the sample output is not mentioned in the question we have provided the output in the most…
Q: Write Octave commands in the script file that you just created to do the following: 1. Create a row…
A: Required: Write Octave commands in the script file that you just created to do the following:1.…
Q: Analyze the code below: dogs = ["KK", "Cyber", "Blake", “Pinky", "Taki", "Chubby"] a = len (dogs) b…
A: Correct Option => a. 2 For more understanding , I have provided PYTHON CODE along with…
Q: Consider the following and create a DataFrame df and answer given questions Fruits Pulses 931.0 Rice…
A: As no programming language has been used, Python has been used to solve the given question As per…
Q: Which of the following is a disadvantage of using separate chaining? O It requires many pointers O…
A: In this question we have to give answer for the following, in which we have give the disadvantages…
Q: Hello world Program ; Title Hello World Program org 100h .data ; Declare variables hello_message db…
A: //Hello program in 8086 microprocessor org 100h jmp start message db "Hello World$" ; Allocate 1…
Q: 102 Jump to level 1 Compute: z 1 include 4 include 5 using namespoce std3; 7 int main() ( double…
A: I have Provided this answer with full description in step-2.
Q: Consider the following cell array: c_array={41, 'a'; 1:2:8, 'hai'} which of the following command…
A: Given Array: c_array={41, 'a'; 1:2:8, 'hai} Array stores its elements using index numbers, so the…
Q: Write a PHP script to do the following: Create the following two dimensional array $students: ID…
A: nvnbv nbvnbvbnvgj <?php// PHP program to assign grades to a student// using nested if-else //…
Q: The PHP function header() is used to ___________. a. redirect a user to a different page. b. deny…
A: We are asked a basic question on PHP function header( )
Q: What is printed to the console when the code that follows is executed? ArrayList passwords = new…
A: passwords.add("akjdk12"); => ArrayList(password) will look like this : akjdk12…
Q: Write Octave commands in the script file that you just created to do the following: a) Create a row…
A: Required: Write Octave commands in the script file that you just created to do the following: a)…
Q: would you write a shell script for linux ( file.sh) to sort by column for a table this script will…
A: Give a list of menus with echo to the user. Store the input in the input variable using the read…
Q: [Choose] VA piece of code that requires inpt from elsewhere and returns an outp a type of variable…
A: 1) Functions are a set of instructions/program bundled together to achieve a specific outcome bases…
Q: Consider the following matrix: P = [3 6 9 12; 4 8 12 16; 3 6 9 12] What Octave command will…
A: Consider the following matrix: P = [3 6 9 12; 4 8 12 16; 3 6 9 12] What Octave command will you…
Q: Q12: Giyen x=[7 6 1 2 0 -1 4 3 -2 0] what are the commands that will execute the following…
A: (Ans.a)- x(x < 0) = 0 (Ans.b)- y = x(x>3) (Ans.c)- x = 3 + x(mod(x,2)==0)
Q: Write Octave commands in the script file that you just created to do the following: 1. Create a row…
A: As per our guidelines we are supposed to answer only one question. Kindly repost the remaining…
Q: 1)Answer the question with the correct option A) Which of the following assigns to the pointer p…
A: Assigns to the pointer p to address of value
Q: In C#: Create a function that takes in one argument: The url to an API endpoint. The function should…
A: Solution: c# code function GetKills(url) { varclient = newWebClient(); varjson =…
Q: Here is my entire code(average is not working yet). The response I got from the professor is that I…
A: According to the Question below the Solution: They all have different functions. You can make it…
Q: Imagine you have a spreadsheet with exactly one row of data—row 2—that has three cells with data in…
A: To create a duplicate row or column, have to copy and paste that. To move the whole data to another…
Q: Which of the following is a 2-dimensional array in NumPy Python? arr = np.array([[[1, 2, 3], [4, 5,…
A: CODE(SCREENSHOT) : Explanation : in line 1, numpy library is imported for arrays. in line 3, a 2D…
Q: Write Octave commands in the script file that you just created to do the following: a) Create a…
A: Required: Write Octave commands in the script file that you just created to do the following:…
Q: Write a python program based on the given dataset link
A: Import pandas module use read_excel function to read the excel file into data get subset of data by…
Q: roblém Statemer Write a program that prints an nxn multiplication table, given a positive integer n.…
A: The for loops are used when you have a block of code which you want to repeat a fixed number of…
Q: In this homework your task is to get familiar with Racket and using its features (for introductory…
A: #include <bits/stdc++.h>using namespace std; bool isOperand(char x){ return (x >= 'a'…
Q: Assume array of 5 dynamic objects has been created (dynarrObj[5]). Which of the following is the…
A: delete is used for deallocation
Q: Question 3 What is the output of the following code? ArrayQueue AQ=new ArrayQueue (); AQ.offer(15):…
A: output of the following code are
Q: Jump to level 1 numbers = (55, 11, 15, 24, 59, 79, 61, 72, 99, 96) Partition(numbers, 5, 9) is…
A: Given, numbers = (55, 11, 15, 24, 59, 79, 61, 72, 99, 96) low = 5 high = 9 Quick sort algorithm is…
Octave
Step by step
Solved in 3 steps
- PYTHON In order to parse data to start a simulation, users must enter data correctly. Suppose that the simulation requires 2 information from the user, which is called 'soil_key' and 'soil_data.' The user will enter 'soil_key' first, following with 'soil_data.' We need to check if the user enters the 'soil_data' data correctly. All elements in soil data ('soil_data') must be characters defined in the soil keys ('soil_key'). Both soil_key and soil_data are lists. Consider an example: INPUT: soil_key = ['C', 'Clay', ' B', 'Bedrock', ' V', 'Void'] soil_data1 = [ ['V', 'C', 'V'], ['C', 'V', ' '], ['B', 'M', 'B'] ] soil_data2 = [ ['B', 'C', 'V'], ['C', 'V', ' B'], ['B', 'C', 'B'] ] OUTPUT: soil_data1: check data again. Parsing failed! soil_data2: Parsing successfully. Write a python function that checks if the soil data is being entered correctly. Return True and print 'Parsing successfully' for correct data. Otherwise, return False and tells the user 'check data again. Parsing…В.width; } { t = B.type; w = { T.type = C.type; T.width = C.width; } T → B C В > int { B.type = integer; B.width 4; } В — foat { B.type = float; B.width = 8; } { C.type = t; C.width = w; } C - [ num] C1 = array(num. value, C1.type); { C.type C.width = num. value x C1. width; }# Create Custom Transformer Create a custom transformer, just as we did in the lecture video entitled "Custom Transformers", that performs two computations: 1. Adds an attribute to the end of the numerical data (i.e. new last column) that is equal to $\frac{x_1^3}{x_5}$ for each observation. In other words, for each instance, you will cube the $x_1$ column and then divide by the $x_5$ column. 2. Drops the entire $x_4$ feature column if the passed function argument `drop_x4` is `True` and doesn't drop the column if `drop_x4` is `False`. (See further instructions below.) You must name your custom transformer class `Assignment4Transformer`. Your class should include an input parameter called `drop_x4` with a default value of `True` that deletes the $x_4$ feature column when its value is `True`, but preserves the $x_4$ feature column when you pass a value of `False`. This transformer will be used in a pipeline. In that pipeline, an imputer will be run *before* this transformer. Keep…
- Hef sharks_minnows (minnows, sharks): shark_count = 0 minnow_count = len (minnows) for i in range(minnow_count): curr_shark_height = minnows [i] if curr_shark_height is not None: minnows [i] = None for j in range (i + 1, minnow_count): if minnows [j] == curr_shark_height: minnows [j] = None curr_shark_height -- 1 shark_count += 1 return shark_count <= sharks The provided code is imperfect, in that it sometimes returns True when it should return False, and sometimes returns False when it should return True. (a) Provide an example of a function call where the provided code will correctly return True (i.e. a True Positive) (b) Provide an example of a function call where the provided code will correctly return False (i.e. a True Negative) (c) Provide an example of a function call where the provided code will incorrectly return True (i.e. a False Positive) (d) Provide an example of a function call where the provided code will incorrectly return False (i.e. a False Negative)Class name: SURNAME_MATRIX Data fields: two(2) q xr arrays where: q = no. of characters of your first name. If q <= 5 then q = q * 2. r= no. characters of your surname. if r<= 5 then r=r*2. Methods: Constructor: initialize two(2) arrays. Value of each element = no. of characters of your fullname * 2.5. fillA1() - populate 2d-Array1 with random numbers. (200 max). seed - default fillA2() - populate 2d-Array2 with random numbers. (5000 max). seed - default addSubA1A2(int flag) - add or subtract the two matrices and display the resultant matrix (size is q xralso). (note: invoke first fillA1() and fillA2()) if flag is nonzero add matrices else subtract matrices. e.g. addSubA1A2(3) <-- add arrays, addSubA1A2(0) <-- subtract arrays toString() - displays the current date once and your fullname k times where kis a random number < 8. Filename: SURNAME_SSE2.java In main(): Create two(2) objects using array of objects and use ALL the methods for each object.Simple Student Management System Build the following app using Python Tkinter library. Using this app, user can • add student information • view all students • search student(s) by name • remove student by id Add • First name, last name, date of birth cannot be blank while adding a specific student information. • However major can be blank, which gets set to "Undefined" if left out blank. • Student Id is automatically generated by the program (ex: 1001, 1002, 1003, 1004 ….) If the user keeps a mandatory field blank (ex: First name) and presses "Add Student" button, it displays the following message box: first name is required If the user successfully enters all the necessary information and presses the "Add Student" button, it displays the following confirmation message box: student added View All When the user presses the "View All" button, it displays all the student’s information (Id, First name, Last name, Date of birth, and Major) in a nice formatted way. Example below: • Must…
- Python Programming Problem: Simple Soccer Point TableThe programmer will design a simple point table lookup and update application. The table contains some basic information: team_name, match_played, win, draw, loss, point and rank. Design Solution:1. English Premier League is a prestigious soccer league. Here is the result of its one session. Man. City|38|32|2|4|98|1Liverpool|38|30|7|1|97|2Chelsea|38|21|9|8|72|3Tottenham|38|23|2|13|71|4Arsenal|38|21|7|10|70|5 2. Hypothetically, you have been assigned to design a simple lookup software for prestigious ‘English Premier League’ from a given point table. The point table contains team_name, match_played,win, draw, loss, points and rank. 3. The input file, ‘previous_result.txt’ has been provided to you above the top 5 teams in 2018-19 session. Your software needs to be able to search and update the point table based on user input. For example: The first time Chelsea played 38, the second time it changed (based on user input) to 40 and so…<?php $marks = array( "Sara" => array( "Programming" => 95, "DataBase" => 85, "Web" => 74, ), "Diana" => array( "Programming" => 78, "DataBase" => 98, "Web" => 66, ), "Amy" => array( "Programming" => 88, "DataBase" => 76, "Web" => 99, ), ); // 1 : sort the array by the name of student from A-Z; // 2 : search if Ram is exist :// if exiset print the value; else : student does not exist<?php $marks = array( "Sara" => array( "Programming" => 95, "DataBase" => 85, "Web" => 74, ), "Diana" => array( "Programming" => 78, "DataBase" => 98, "Web" => 66, ), "Amy" => array( "Programming" => 88, "DataBase" => 76, "Web" => 99, ), ); ?> 1 : sort the array by the name of student from A-Z; 2 : search if Ram is exist : if exiset print the value; else : student does not exist 3 : calculate the avg of each student and print it as : the avg for Sara is : 84.66
- JAVA CODE PLEASE Functions with 2D Arrays Quiz by CodeChum Admin Write a program that asks the user for the row and column size of a 2D array and asks the user for the elements. Write the total of the sum of each row multiplied with the row number. Example: 1 2 3 -> (1+2+3) * 1 = 6 4 5 6 -> (4+5+6) * 2 = 30 7 8 9 -> (7+8+9) * 3 = 72 total: 108 Input 1. One line containing an integer for the number of rows 2. One line containing an integer for the number of columns 3. Multiple lines containing an integer for every element of the array for each line Output Row·size:·3 Column·size:·3 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·9A deque data structure implements the following functions: insertFront(int); //Insert at the front insertBack(int);//Insert at the back removeFront();//Remove and print front element eraseBack();//Remove and print last element first();//print first element last();//print last element Write the output of the following sequence of operations: insertFront(3), insertBack(8), insertBack(9), insertFront(5), removeFront(), eraseBack(), first(), insertBack(7), removeFront(), last(), eraseBack().A deque data structure implements the following functions: insertFront(int); //Insert at the front insertBack(int);//Insert at the back removeFront();//Remove and print front element eraseBack();//Remove and print last element first();//print first element last();//print last element Write the output of the following sequence of operations: insertFront(3), insertBack(8), insertBack(9), insertFront(5), removeFront(), eraseBack(), first(), insertBack(7), removeFront(), last(), eraseBack(). Write the sequence of numbers without space or comma.