Writing a function to perform calculations on the number of square feet to be painted, the number of coats to be painted and the symbol indicating the type of paint, to get the number of gallons to cover the area to be covered returned, requires the application of which type of function? Select one: a. with return value, no argument O b. no return value, with arguments O c. no return value, no argument O d. with return value, with arguments
Q: Without systems analysis, there will be no system development, inadvertently without a proper system…
A: A system analyst is considered as an IT professional. A system analyst should be powered with the…
Q: hich tree provides a linear time solution for substring operation? a) Rope Tree b) Suffix Tree c)…
A: A compressed tree holding all the suffixes of the provided text as their keys and locations in the…
Q: What is the possible number of binary trees that can be created with 3 nodes, giving the sequence N,…
A: The Correct Option(5) is right choice. Reasion: Explanation: 5 binary trees are possible and they…
Q: Describe the effects on Unix data structures of using the open() function with device files. What is…
A: What Unix data structures are impacted by an open() call on a device file is the matter at hand. How…
Q: weight balanced and height balanced tree definations
A: Answer - weight balanced and height balanced tree definations hence the option A is true
Q: solve in PYTHON using open GL library and dont use 8 way symmetry. solve for zone 0 and 2. question-…
A: import numpy as npimport matplotlib.pyplot as plt x_init = int(input("Enter starting x-coordinates:…
Q: The roots of the elements of the subtrees are smaller than the root of the heap. a) True b) False
A:
Q: Joseph is a doctor. He works at the Chris Hani Baragwanath Academic Hospital in Soweto. He is…
A: Attribute : Profession, work, responsibility (private ) Method: getProfession() ,…
Q: Consider the game having the following normal form. What is the payoff of the column player when the…
A:
Q: What kinds of tools and technologies may be utilised to help in software testing? Give detailed…
A: Introduction: The following tools and technologies can be used to help in software testing. Tool for…
Q: Explain the different factors affecting the processing speed of CPU.
A: In Step 2, I have provided answer with brief explanation-----------------
Q: What is the worst case efficiency for a path compression algorithm?
A: please check the step 2 for answer
Q: This comprehensive explanation of how the Domain Name System (DNS) works covers a wide range of…
A: Introduction This in-depth look at how DNS works delves into iterated and non-iterated requests,…
Q: Computer Science Like is used to match similar records. For example, where myfield like "cat_"…
A: The statement given:- Like is used to match similar records in Computer science. For example,…
Q: It may be useful to provide an example of a recent security breach involving access control or…
A: Intro Describe a recent security breach in the news that included access control or authentication.…
Q: 7. Write a Java Program to implement the bank operation using Multiple Inheritance (Bank Interface,…
A: Java Program:// Bank interfaceinterface Bank{ // 12% interest for 3 years double rate_of_interest…
Q: Which of the following is TRUE? O As is a dominant strategy for Player A. O The game has dominant…
A: please check the step 2 for solution with explanation.
Q: Q8: (Application Layer) Description of the type of payload and the contents of same.
A: Q-1) Layer 4 - protocol is - UDP protocol Q-2) Source MAC address - b8:8d:12:00:0d:fa Q-3)…
Q: For the graph in Figure 1 below, construct a spanning tree using the breadth-first algorithm. Show…
A: Here we have given a spanning tree using breadth first strategy. You can find the solution in step…
Q: Poor transmission and sound quality are exacerbated by attenuation, distortion, and noise. What can…
A: The interruption which occurs while transmitting the signals is called distortion and the lower…
Q: A. List down two differences between Software as a Service (SaaS) and Infrastructure as a Service…
A: Note: Since the question is multipart we are advised to do only one question. Kindly post other…
Q: In the Union/Find algorithm, the ranks of the nodes on a path will increase monotonically from? a)…
A: In Disjoint Set union ; Union() and find() are naive functions with linear worst-case time…
Q: // This file defines the Building class // and the Hotel class that inherits from it. // A…
A: The corrected code is given below:
Q: Given a chess board, your job is to write a program that takes two squares x and y as input and then…
A: Program: #include <bits/stdc++.h> using namespace std; int dx[8]={-2, -2, -1, -1, 1, 1, 2,…
Q: Given a link with a maximum transmission rate of 34.1 Mbps. Only two computers, X and Y, wish to…
A: Given, =>Bandwidth(B) = 34.1Mbps =>Transmission start time (t) = 0 =>File X size = 19 MB…
Q: select id_room, type of room, max (price) from room how to change it into relational algebra
A: A procedural query language used to apply operations on relations is called relational algebra. It…
Q: The maximum number of nodes in a tree for which post-order and pre-order traversals may be equal is…
A: Answer:
Q: 4. Convert the NFA in Figure 1 into an equivalent DFA using the standard procedure. for such a…
A: Below is the answer to above question...
Q: How much time does construction of suffix tree take? a) O (log M) b) O (M!) c) Exponential to Length…
A: Following each suffix and starting with the top node, we create a suffix tree, giving…
Q: A bit-stuffing based framing protocol uses a 8-bit delimiter pattern of 00111100. If the output…
A: According to the information given:- We have to determine number of bit stuffed in order to get…
Q: O As is a dominant strategy for Player A.
A: A3 is a dominant strategy for player hence the option A is the correct answer for the given question…
Q: What are double and single threaded trees?
A: Single Threaded Binary Tree:In this each node is threaded towards either the in order predecessor or…
Q: What is the distinction between security policy and information security standards in terms of…
A: Introduction: When choosing the layer and kind of security to be given for apps, the feature of the…
Q: Using examples, explain data manipulation, forgeries, and online jacking.
A: Introduction: Data manipulation Data manipulation is a fraudulent cyber activity in which an…
Q: Which of the following is the implementation of the ternary tree? a) AVL Tree b) Ternary Heap c)…
A:
Q: 1. Compute the average path length and average diameter. 2. Peripheral and Central vertex of the…
A: Please check the step 2, 3 & 4 for solution
Q: Use and clearly show Dijkstra's Algorithm to find the shortest distance from Deep Springs to…
A: The dijkstra algorithm is one type of algorithm and which also used to find shortest path in the…
Q: What are double and single threaded trees? a) when both left, right nodes are having null pointers…
A: Answer: a Explanation: They are properties of double and single threaded binary trees respectively.
Q: There are several ways to find open source operating systems.
A: Introduction: Operating system: It is software that functions as a link between the user and the…
Q: What is stored in score1, score2, and grade? 0 Integer score1 - 72; int score2-85; Character grade -…
A: Given lines of code are, Integer score1 = 72; int score2 = 85; Character grade = 'C'; It contains…
Q: Which node contains a pointer to its parent? a) root node b) right most child c) left most child d)…
A: The answer is given in the below step
Q: Which of the following pair’s traversals on a binary tree can build the tree uniquely?
A: Introduction Full binary tree is one of the data structure where there is only one root node and…
Q: 1. Explain the potential obstacles that may hinder the successful implementation of the new…
A: Introduction Any type of technology that is further developed or computerized compared with that…
Q: Consider the following normal form of the game with two players. Which of the following is the…
A: The answer is given in the below step
Q: It is critical to have a strong knowledge of the meaning behind a software product's settings. What…
A: Intro The process of tailoring a software product to match the demands of a client is known as…
Q: Explain the following terms: Cursor, Embedded SQL, JDBC, SQLJ, stored procedure.
A: The system software used to create and administer databases is referred to as a database management…
Q: What flaws in the Whetstone, Dhrystone, and Linpack benchmarks are addressed by the SPEC CPU…
A: Introduction: Reinhold P. Weicker created Dhrystone, a benchmark software for synthetic computing,…
Q: Construction of a 2D tree from N random points requires 2N In N sons, on the average.
A: "Yes, the construction of a 2D tree from N random points requires 2N In N comparisons, on the…
Q: Explaining the maximum power point tracking Mppt algorithm
A: What is an algorithm: An algorithm is a set of guidelines for resolving a dilemma or carrying out a…
Q: What industry has databases made possible?
A: Databases are organised collections of data that are simple to access, manage, and update. Because…
Step by step
Solved in 2 steps
- (Numerical) Heron’s formula for the area, A, of a triangle with sides of length a, b, and c is A=s(sa)(sb)(sc) where s=(a+b+c)2 Write, test, and execute a function that accepts the values of a, b, and c as parameters from a calling function, and then calculates the values of sand[s(sa)(sb)(sc)]. If this quantity is positive, the function calculates A. If the quantity is negative, a, b, and c do not form a triangle, and the function should set A=1. The value of A should be returned by the function.(Practice) For the following function headers, determine the number, type, and order (sequence) of values that should be passed to the function when it’s called and the data type of the value the function returns: a. int factorial(int n) b. double volts(int res, double induct, double cap) c. double power(int type, double induct, double cap) d. char flag(char type, float current, float time) e. int total(float amount, float rate) f. float roi(int a, int b, char c, char d, float e, float f) g. void getVal(int item, int iter, char decflag, char delim)Sometimes a program has multiple functions with the same name but differing in the number or types of parameters, known as function name overloading or just function overloading. t or f
- The following formula can be used to determine the distance an object falls due to gravity in a specific time period: d = 1⁄2 gt2The variables in the formula are as follows: d is the distance in meters, g is 9.8, and t is the time in seconds that the object has been falling. Write a function named fallingDistance that accepts an object’s falling time (in seconds) as an argument. The function should return the distance, in meters, that the object has fallen during that time interval. Write a program that demonstrates the function by calling it in a loop that passes the values 1 through 10 as arguments and displays the return value.Calling a function and defining a function mean the same thing True or FalseUsing User-defined Functions with return statement Create a program that will use user-defined functions that return a value. NOTE:Create a program that will compute for the area of square, rectangle, triangle and circle.Use user defined function for each shape.Any number divided by zero will result to undefined. Formulas:Square Area = s²Rectangle Area = w * lTriangle Area = (h * b) / 2Circle Area = πr² where: π = 3.1416 NOTE:Your source code must display any of the given sample output below.It means your source code should be flexible enough to meet any of the given sample output.Your source code output must be identical to any of the given sample output.It means you have to strictly follow what are the displayed text, labels, casing of characters in the sample output. Sample OUTPUT 1 AREA MENU [1] Square [2] Rectangle [3] Triangle [4] Circle Option: 1 Side: 10 Area: 100 Sample OUTPUT 2 AREA MENU [1] Square [2] Rectangle [3] Triangle [4] Circle…
- The following formula can be used to determine the distance an object falls due togravity in a specific time period:d =112 gt2The variables in the formula are as follows:• d is the distance in meters,• g is 9.8,• and tis the time in seconds that the object has been falling.Write a function named fall i ngDi stance that accepts an object's falling time (in seconds)as an argument. The function should return the distance, in meters, that the object hasfallen during that time interval. Write a program that demonstrates the function by callingit in a loop that passes the values 1 through 10 as arguments and displays the return value.// // Write a function that calculates the amount of money a person would earn over // a period of years if his or her salary is one penny the first day, two pennies // the second day, and continues to double each day. The program should ask the // user for the number of years and call the function which will return the total // money earned in dollars and cents, not pennies. Assume there are 365 days // in a year. // function totalEarned (years) { // Insert your code between here and the next comment block. Do not alter // // any code in any other part of this file. // Insert your code between here and the previous comment block. // any code in any other part of this file. Do not alter // // var years = parseInt(prompt('How many years will you work for pennies a day? ')); var totalDollarsEarned = totalEarned (years); alert('Over a total of ' + years + ', you will have earned $' + totalDollarsEarned);Which statement below is true about a function: may have no parameters must always have a return statement must have at least one parameter its arguments always appear within brackets
- For each of the following functions, indicate how much the function's value will change if its argument isincreased fourfold. log2n n3 2nTask 3 Write a function called foo moo that takes a number as an argument and returns the following statements according the below mention conditions. Then, finally prints the statement in the function call. • If the number is divisible by 2, it should return "Foo". • If the number is divisible by 3, it should return "Moo". • If the number is divisible by both 2 and 3, it should return "FooMoo". • Otherwise, it returns "Boo". ========= %============= Example1: Function CalI: foo_moo(5) Output: ВооFor each of the following functions, indicate how much the function’s value will change it its argument is increased Triple.