Course Solutions Uncategorized (Solved) : 9 Considering Following Code Segment Num Q30645685 . . . .

(Solved) : 9 Considering Following Code Segment Num Q30645685 . . . .

 

9.

Considering the following code segment:

if ( num <0) {

alert(“It’s a negative num.”);

}

else {

   alert(“It’s a non-negative num.”);

}

What will be displayed if num=0?

It’s a positive num.

It’s a non-negative num.

It’s a zero.

Nothing will be displayed.

10.

Considering the following code segment:

if(x>y) {

y=x;

}

else if (x == y){

x=1000;

}

else{

y =100;

}

alert ( ‘x=’ + x + ‘, y = ‘+y);

Given x=0 and  y=5, what will be displayed?

x=0, y=5

x=0, y=100

x=1000, y=100

x=0, y=0

11.

If variable answer stores a Boolean value, then what are thepossible values for the variable?

0 or 1

“true” or “false”

true or false

any value

12.

Suppose variables roll1 = 3 and roll2 =4, which of the following will be evaluated as true?

roll1>3 || roll2

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : 6 Determine Number Moles Nitrogen 413 Lb Sample Dinitrogen Tetraoxide 7 Determine Number G Q33248748 . . . .(Solved) : 6 Determine Number Moles Nitrogen 413 Lb Sample Dinitrogen Tetraoxide 7 Determine Number G Q33248748 . . . .

<br/><img src="https://media.cheggcdn.com/media%2F605%2F605a64bf-19d0-46d8-8bc6-4749b907cd70%2Fimage.png" alt="6. Determine the number of moles of nitrogen in a 4.13 lb sample of dinitrogen tetraoxide. 7. Determine the number of grams in a 0.983moles sample of CH