Implement function triangleArea(a,b,c) that takes as input the lengths of the 3 sides of a triangle and returns the area of the triangle. By Heron's formula, the area of a triangle with side lengths a, b, and c is √ s ( s−a )( s−b)( s−c ) , where s=(a+b+ c )/ 2 . >>> triangleArea(2,2,2) 1.7320508075688772
Q: track is 1000, and rotation speed of disk is 1500
A: The answer is
Q: Lab-2: Write a program to implement a full calculator that must add two float numbers using a case…
A: ALGORITHM:- 1. Take input for the choice of operation from the user. 2. Take the operands as input…
Q: How to Installing Software on CentOS, Fedora, and RedHat Distributions in linux?
A: Commands for Installing Software on CentOS, Fedora, and RedHat Distributions in linux is given in…
Q: What is a camera aperture, and what creative things can you do with it? Controls exposure and…
A: Camera aperture can basically be referred as a single hole in the lens of the camera, which helps in…
Q: how do you Calculate a query in access database on how many customers there are for each lawn size?…
A: To write SQL query directly on MS Access, Open the Database. 1. Select Design View, and click OK.…
Q: Q6) Consider the alphabet Σ = {a,b}. Consider the Non-Deterministic Finite Automaton (NFA). start O…
A: NFA Stands for Non Deterministic Automaton.
Q: 6.What are the methods for handling deadlocks?
A: Introduction A deadlock occurs when a group of processes is obstructed. This happened because…
Q: Programming Challenge 1: Create a Java program that collects numeric data from a user (10 values…
A: “Since you have asked multiple question, we will solve the first question for you. If you want any…
Q: networks and how this issue can be resolved?
A: The answer is
Q: Solve in C Program Implement infix to postfix conversion and evaluate a postfix expression Add the…
A: The answer is given below.
Q: The assessment focus on the investigation of the use of information system in a business company…
A: ANSWER:-
Q: C:/Users/r1821655/CLionProjects/untitled/sequence.cpp:48:5: error: return type specification for…
A: Constructor is a special method that is invoked automatically at the time of object creation. It is…
Q: A computer employs RAM chips of 512 x 16 and ROM chips of 1024 x 8.
A: The answer is
Q: 5 & 6 I'm not able to understand Pl
A: Steps count - Total steps taken to get the final result. Time complexity: Time is taken by an…
Q: Define a function distance that consumes a point (i.e. 2 integers say x1, y1) and displays the…
A:
Q: What are the difference between Kerberos version 4 and version 5?
A: Given To understand the distinction between Kerberos versions 4 and 5.
Q: Which three addresses are considered as Class B addresses in the legacy classful addressing system?…
A: Answer:-C - 129.1.1.1
Q: What is a camera shutter speed, and what creative things can you do with it? Controls Exposure…
A: Camera Shutter speed is the speed at which the shutter of the camera closes.
Q: Description of program: Logical operators. Suppose the variables a and b have values 8 and 6, and…
A: Here is your solution in python language:
Q: Give the view of OS as an extended machine
A:
Q: When you run the ls -l command, what is the first letter in the information displayed? Group of…
A: Answer:- directory
Q: Q.28 Explain strength and weakness of Kerberos.
A:
Q: class Keyboard: """A Keyboard takes in a list of buttons, and has a dictionary of positions as keys,…
A: CODE : class Keyboard: #Constructor def __init__(self, buttons): #Dictionary to…
Q: I need a flowchart for this * RockNRollah.java * Write an application to simulate the rolling…
A: Java Programming which refers to an object oriented programming languages. It is used to run on the…
Q: Q.15 Describe ECB.
A:
Q: Each time slot contains 148 bits. Just 114 of these 148 bits reflect speech or other info. of…
A: The answer is
Q: Haskell or I will give negative on it Write a function which computes the image of R under a…
A:
Q: Assume X = $2CD1, Y =$ACBF, A = $EA, B = $FB and CCR = $FF
A: The answer is
Q: Describe any five software restructuring methodologies not addressed in class, including their…
A: Introduction In this question, we are asked five software restructuring methodologies not addressed…
Q: Convert the hexadecimal number 68BE to binary and then convert it from binary to octal.
A: We need to convert hexadecimal number 68BE to binary, and then to octal.
Q: Implement a queue using stack: - use two stack - while pop(),shift all elemente in one stack to…
A: implementation of a queue using stack is given in next step:-
Q: Weite java code to implement given statements An abstract class must be declared with an abstract…
A: Given data: An abstract class must be declared with an abstract keyword.• It can have abstract and…
Q: explain the input transformation process output of a hotel resort
A: A transformation process is any activity or group of activities that takes one or more inputs,…
Q: Define a recursive function merge Ord a => [a] -> [a] -> [a] :: hat merges two sorted lists of…
A: Lets see the solution.
Q: I am attempting to write a 2-paramter constructor that meets the following specifications: /** *…
A: A constructor is a unique method that is used to initialize objects. The constructor is called…
Q: Write a short note on the short read alignment problem.
A: Introduction : Understanding the location of a sequence in the genome is done by short-read…
Q: Write a java program to check if a user entered string contains the vowels or not.
A: java program to check if a user entered string contains the vowels or not is given below. All…
Q: Q.5 How firewalls are configured and managed?
A: Introduction: In keeping with the guidelines said in the security policy, it determines whether to…
Q: Describe ‘Proof Surrogates’ ?
A: The answer is given below.
Q: Suppose you wanted to implement a control unit for a computer that you are designing. A. Would you…
A: The above question is solved in step 2 :-
Q: y(n) = 0.0899x(n) + 0.0257x(n − 1) - 0.0257x(n − 2) - 0.0899x(n − 3) + 1.6148y(n − 1) – 1.9395y(n −…
A: Given equation, y(n) = 0.0899x(n) + 0.0257x(n-2) - 0.0899x(n-3) + 1.6148y(n-1) - 1.9395y(n-2) +…
Q: Q3. Compute the complexity (O-big notation) of the following algorithms and explain the result…
A: Big-O notation is a tool used in Algorithm to measure the running time of an algorithm.It calculates…
Q: Q.9 Explain ISAKMP protocol for IPsec.
A: ISAKMP/Oakley is the name of the key management protocol used in IPSec. The Internet Security…
Q: Problem Statement Create a program that will determine whether a triple can generate a triangle and…
A: The python program is given below:
Q: Convert the following expressions from infix to reverse Polish (postfix) notation. W * X - W * (U *…
A: Answer is
Q: 1. Let's suppose there is an organization with two departments with each department requiring 120…
A: Let's suppose there is an organization with two departments with each department requiring 120 host…
Q: Explain RSA algorithm used for key cryptography
A: Lets see the solution.
Q: 2. Write (and evaluate) Python expressions that compute: a. The product of 1111111 with itself. b.…
A: “Since you have posted a question with multiple sub-parts, we will solve first three sub- parts for…
Q: Briefly explain how libc the malloc() family of functions (malloc(), calloc(), realloc(), free())…
A: We need to discuss how libc the malloc() family of functions (malloc(), calloc(), realloc(), free())…
Q: public class PhoneList { public static void main (String[] args) { Contact[] friends = new Contact…
A: To compare two String objects, use the compareTo method on a String object For example The function…
triangle with side lengths a, b, and c is √ s ( s−a )( s−b)( s−c ) , where s=(a+b+ c )/ 2 .
>>> triangleArea(2,2,2)
1.7320508075688772
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 4 images
- [Unbalanced Rod] Given a set of n weights {w₁,..., wn} and a rod of length n - 1 inches, we can attach the weights to the rod at hooks placed at one inch distances apart as shown in the figure below. -1". /10 2 3 12 2 4 We can attach a weight to any hook but no two weights can be attached to the same hook and we have to attach all the weights. For any given assignment of weights to hooks, we can compute the location of the center of mass of the rod and the weights according to the following equation (neglecting the weights of the rod and the hooks). where 0 ≤ Pi≤n-1 is the position of weight along the rod. For example, in the figure shown above, the center of mass is computed as C= C = i Wi Pi Σi Wi 10 0+2 1+3·2+4·3+12.4 +2.5 10+2+3+4+12+2 78 33 The problem is to find an assignment of weights to hooks that makes the center of mass as far as possible to the left, i.e., minimize the value of c. Answer the following questions. 1. Describe a greedy algorithm that finds the assignments that…Implement a function that takes incoefficients A,B,and C for the quadratic equation Ax2 + Bx + C = 0 and computes the two solutions. Have the function return the number of valid (not NaN) solutions and fill in the return arguments so the smaller of the two solutions is first.Write a recursive function called draw_triangle() that outputs lines of '*' to form a right side up isosceles triangle. Function draw_triangle() has one parameter, an integer representing the base length of the triangle. Assume the base length is always odd and less than 20. Output 9 spaces before the first '*' on the first line for correct formatting. Hint: The number of '*' increases by 2 for every line drawn. Ex: If the input of the program is: 3 the function draw_triangle() outputs: * *** Ex: If the input of the program is: 19 the function draw_triangle() outputs: * *** ***** ******* ********* *********** ************* *************** ***************** ******************* Note: No space is output before the first '*' on the last line when the base length is 19. if __name__ == '__main__': base_length = int(input()) draw_triangle(base_length)
- 1. Variations on function composition, addition, etc. extern int g(int x, int y) extern int h(int x) int f(int x, int y) { return(. } ); where what goes in the blank might be a. g(x, y) + h(x) b. g(x, y) + h(y) c. h(g(x, y)) d. h(g(x, y)) + x e. h(g(x, y)) + y Show the RISC-V translation of f for each of the above cases.Write overloaded function in Java calculate() with following function definitions. void calculate(int x, int y ) – to calculate the sum of all even numbers from x till y and print the sum. void calculate(char a,char n) – to print all vowels from variable a to n if any void calculate(int x, int y, int z) – to print the middle number from x,y,z if you arrange them in ascending order.Python only Rajesh loves lucky numbers. Everyone knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, the numbers 47,744, 4 are lucky and 5, 17,467 are not. Let Fa(x) equal the number of digits d in the decimal representation of the positive integer x. Chef is only interested in F4(x) and F7(x) functions. For a given positive integer N, he wants to know the total number of distinct pairs (L; R) such that F4(L) + F4(L + 1) + ... + F4(R) equals F7(L) + F7(L + 1) + ... + F7(R) and 1Hi here Python3 function sqr(n) that returns the square of its numeric parameter n..Use java Language Write the function parrotTrouble.** We have a loud talking parrot. The "hour" parameter* is the current hour time in the range 0..23. We are* in trouble if the parrot is talking and the hour* is before 7 or after 20. Return true if we are* in trouble.** Some Examples:* parrotTrouble(true, 6) returns true* parrotTrouble(true, 7) returns false* parrotTrouble(false, 6) returns false** @param isTalking true if the parrot is talking.* @param hour the time of day from 0..23.* @return true if you're in trouble with your neighbors.a)Write a Java code which gives the value of (14(1/n)Pn for n= 2,4, You can use the function Math.pow(xy) ,214. b) BuggySum(a, a.length-1) has to calculate the sum of numbers on matrix but does not. Find the problem and show how to fix it. public static double BuggySum(doublel] a, int k) ( if (k == 0) return 0.0; else return a[k] + BuggySum(a, k-1); Please write the complete code.What does this function do? def f2(s): i=len(s)-1 while(i>=0): print(s[i),end=") i=i-1 A) It prints the reverse of its parameters B) It counts the number of 'a' characters in its parameter s It counts the number of 's' characters in its parameter s It prints its parameter s Question 6 What's wrong with this code? i=10 while(i>100): print('Ali') i=i+1 It produces nothingpublic static int Ack(int m, int n) { if (m == 0) { return n + 1; } else if (n == 0) { return Ack (m } else { } } return Ack (m - - 1, 1); 1, Ack (m, n- What is the return value of this function for a. Ack(0,0) b. Ack(0,3) c. Ack(0,6) Can you use the above three samples and come up with a formula for Ack(0,n)? 1));Suppose two line segments intersect. The two end- points for the first line segment are (x1, y1) and (x2, y2) and for the second line segment are (x3, y3) and (x4, y5). Write the following function that returns the intersecting point if the two lines intersect: void intersectPoint(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, double& x, double& y, bool& isIntersecting)Write a program that prompts the user to enter these four endpoints and displays the intersecting point.SEE MORE QUESTIONS