how is this solves?
function looping(x,y){
for(var i=0; i<x; i++){
for(var j=0; j<x; j++){
console.log(i*j);
}
}
}
z = looping(3,3);
console.log(z);
<html>
<body>
<script language="javascript">
function looping(x,y)
{
var str="";
for(var i=0; i<x; i++)
{
for(var j=0; j<y; j++)
{
str=str+i*j+" ";
}
str=str+"\n";
}
return str;
}
z = looping(3,3);
console.log(z);
</script>
</body>
</html>
how is this solves? function looping(x,y){ for(var i=0; i<x; i++){ for(var j=0; j<x; j++){ console.log(i*j);...
What would the result be if you ran the following code: function makeAdder(x) { return function(y) { return x + y; }; } var add8 = makeAdder(8); var add12 = makeAdder(12); console.log(add8(4)); console.log(add12(5));
X and z are independent. Var(x)=1 ; Var(z) = sigma ^2. E(z)= 0 and y= ax+b+z I) cov(x,y)= ? ii) corr(x,y)=? dependent Varvane 2.
what will be the output? var msg = 'codingdojo'; for(var x =-2; x { if(msg.length == 5) { for(var i =2; i<5; i++) { console.log(i) } } else { for(var i = msg.length; i>(msg.length -2); i++) { console.log(i); } } }
8. (10%) Consider the following JavaScript program: // The main program var x,y; function f10{ var y, z; function f20{ var x, Z, P; function f30{ var x, z, ; Assume that the execution of this program is in the following unit order: main calls f3, f3 calls f1, f1 calls 12. a) Assuming that static scoping is in effect, indicate which version of each of the following variables will be visible in f2 by filling in each blank with...
Suppose that EX-EY-0, var(X) = var(Y) = 1, and corr(X,Y) = 0.5. (i) Compute E3X -2Y]; and (ii) var(3X - 2Y) (ii) Compute E[X2]
X,Y, and Z are random variables. Var(X) = 2, Var(Y) = 1, Var(Z) = 5, Cov(X,Y) = 3, Cov(X, Z) = -2, Cov(Y,Z) = 7. Determine Var(3X – 2Y - 2+10)
For random variables X, Y, and Z, Var(X) = 4, Var(Y) = 9, Var(Z) = 16, E[XY] = 6, E[XZ] = −8, E[Y Z] = 10, E[X] = 1, E[Y ] = 2 and E[Z] = 3. Calculate the followings: (b) Cov(−3Y , −4Z ). (d) Var(Y − 3Z). (e) Var(10X + 5Y − 5Z).
Given Var(X) = 4, Var(Y) = 1, and Var(X+2Y) = 10, What is Var(2X-Y-3)? I know the answer is 15, I'm particularly interested in the specific steps involved with finding the cov(X,Y) in this problem. Please explain in detail, step by step how you come to cov(X,Y) = 0.5 in this equation. Please include any formulas you would need to use to find the cov(X,Y) in this equation.
The Fourier coefficient b, of the periodic function J (*) I for - Sx<0 for 0 SXst is: Select one: a. 2 s(x) - 2* + 4 cosa – cos 2x +cos3x - cos 4x +...+2)-1,7 is the Fourier series of a neither even nor odd periodic function. Select one True O False dz = ... where C is the circle - JC-_2 Select one: o a. 4ni ob. 8ni O co od 2ni If the function f(z) = u(x,...
1. var s = "A red boat"; var a = s.split(" "); what is the value of a? var b = [9, 3, 2, 1, 3, 7]; var c = b.slice(2, 5); What is the value of c? var d = c.concat(a); alert(d.join("**")); [ 'A', 'red' , 'boat'] [ 2 , 1, 3] 2**1**3**A**red**boat [ 'A', 'red' , 'boat'] [ 1 , 3, 7] 8**A**red**boat [ 'A', 'red' , 'boat'] [ 3 , 2, 1] A**red**boat [ 'A', 'red' ,...