subject

Question 1
errors can be syntax errors or logic errors (the code works, but not as intended).

in the guess my number game, there is a lower limit and an upper limit for the range of possible numbers to guess. if the lower limit were exclusive and the upper limit exclusive, which expression would properly generate values for the secret number?

(int)(math. random() * (upper βˆ’ lower) ) + lower
(int)(math. random() * (upper βˆ’ lower + 1) ) + lower
(int)(math. random() * (upper βˆ’ lower) ) + lower + 1
(int)(math. random() * (upper βˆ’ 1 βˆ’ lower) ) + lower + 1
(int)(math. random() * (upper βˆ’ lower + 1) ) + lower βˆ’ 1

question 2
errors can be syntax errors or logic errors (the code works, but not as intended).

which of the following is equivalent to while( ! (userguess == secretnumber) )?

while( userguess ! = secretnumber )
while(userguess < secretnumber || userguess > secretnumber)
while( userguess < secretnumber & & userguess > secretnumber)
i only
ii only
iii only
i and ii only
i and iii only

question 3
errors can be syntax errors or logic errors (the code works, but not as intended).

after execution of the following code segment, what will be displayed?

int x = 15;
while(x > 0)
{
x βˆ’= 6;
}
system. out. println(x);

βˆ’6
βˆ’3
0
3
15

question 4
errors can be syntax errors or logic errors (the code works, but not as intended).

what conclusion can be made about the state of the program when the while loop terminates? assume answer is a declared and initialized string.

while(! answer. equals( "n"))
{
// code not shown
}

the value of answer is n
the value of answer is n or n
the value of answer is not n
the value of answer is y
nothing can be determined

question 5
errors can be syntax errors or logic errors (the code works, but not as intended).

in the guess my number program, the user continues guessing numbers until the secret number is matched. assuming numguesses is initialized to 1, how would the while statement be modified to include an extra criterion limiting the number of guesses to 15?

while( (userguess == secretnumber) || numguesses < 14 )
while( (userguess== secretnumber) & & numguesses < = 15 )
while( ! (userguess == secretnumber) || numguesses < 15 )
while( ! (userguess == secretnumber) & & numguesses < = 15 )
while( ! (userguess == secretnumber) & & numguesses < 15 )

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Formula that contains a nested function that first calculates the average of the values in range e6: p6 and uses the round function to round that average to the nearest 10 dollars. use -1 for the value of the number digit argument. would the formula be =round(average(e6: p6),0
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
The graph shows median weekly earnings for full-time workers according to education level. which can you not conclude?
Answers: 2
question
Computers and Technology, 22.06.2019 22:00
Researchers measured the data speeds for a particular smartphone carrier at 50 airports. the highest speed measured was 78.1 mbps. the complete list of 50 data speeds has a mean of x overbarequals16.11 mbps and a standard deviation of sequals18.65 mbps. a. what is the difference between carrier's highest data speed and the mean of all 50 data speeds? b. how many standard deviations is that [the difference found in part (a)]? c. convert the carrier's highest data speed to a z score. d. if we consider data speeds that convert to z scores between minus2 and 2 to be neither significantly low nor significantly high, is the carrier's highest data speed significant? a. the difference is nothing mbps.
Answers: 3
question
Computers and Technology, 24.06.2019 03:30
The footer area of a web page generally houses which website feature? terms of use web page content business name or title menu headings
Answers: 1
You know the right answer?
Question 1
errors can be syntax errors or logic errors (the code works, but not as intended).<...
Questions
question
Mathematics, 25.09.2019 02:01
question
Mathematics, 25.09.2019 02:01
Questions on the website: 13722367