Answer:
The output is "Pasta"
Explanation:
Given
The attached code segment
Required
The output
The first line of the program implies that:
MyFavFood="Pasta"
This means that, the value of the variable MyFavFood is string "Pasta"
Next,
print (MyFavFood)
This prints the value of the variable MyFavFood which is "Pasta"
<em>Hence, the output is "Pasta"</em>
being able to find out the weather.
being able to wear fancy suits.
Answer:
=IF(D3>50; E3; F3) AND =IF(A1>60;"Pass";"Fail")
Explanation:
An IF structure is built following this pattern:
IF(TEST;IFTRUE;IFFALSE)
These are the only options in the given drop-down menus what comply with this pattern. All others are not following this pattern.
The computer will do the test and if the result is true will apply the IFTRUE value, otherwise will apply the IFFALSE value.
Loop takes only positive numbers and terminates once it encounters a negative numbers.
Answer and Explanation:
Using javascript:
Var positiveInt= window.prompt("insert positive integer");
While(positiveInt>=0){
Alert("a positive integer");
Var positiveInt= window.prompt("insert positive integer");
}
Or we use the do...while loop
Var positiveInt= window.prompt("insert positive integer");
do{
Var positiveInt= window.prompt("insert positive integer");
}
While (positiveInt>=0);
The above program in javascript checks to see if the input number is negative or positive using the while loop condition and keeps executing with each input until it gets a negative input