subject

With some questions. you!

question 1:

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 & & userguess > secretnumber)
while( userguess < secretnumber || userguess > secretnumber)
while( ! (userguess == secretnumber) )
a: i only
b: ii only
c: iii only
d: i and iii only
e: ii and iii only

question 2:
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 inclusive and the upper limit exclusive, which expression would properly generate values for the secret number?

a: (int)(math. random() * (upper − lower) ) + lower
b: (int)(math. random() * (upper − lower + 1) ) + lower
c: (int)(math. random() * (upper − lower) ) + lower + 1
d: (int)(math. random() * (upper − 1 − lower) ) + lower + 1
e: (int)(math. random() * (upper − lower + 1) ) + lower − 1

question 3:
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
}

a: the value of answer is n
b: the value of answer is n or n
c: the value of answer is not n
d: the value of answer is y
e: nothing can be determined

question 4:
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?

a: while( (userguess == secretnumber) || numguesses < 14 )
b: while( (userguess== secretnumber) & & numguesses < = 15 )
c: while( ! (userguess == secretnumber) || numguesses < 15 )
d: while( ! (userguess == secretnumber) & & numguesses < 15 )
e: while( ! (userguess == secretnumber) & & numguesses < = 15 )

question 5:
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 = 1;
while(x < 18)
{
x += 5;
}
system. out. println(x);

a: 16
b: 20
c: 21
d: 22
e: 26

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 19:00
When keyboarding, if you want to be fast and accurate you should return your hands on home row with your fingers relaxed and your eyes on the text use only your index fingers to hunt and peck keep your fingers stiff and your eyes on the keys slouch in your chair and keep your fingers hovering over all of the keys
Answers: 2
question
Computers and Technology, 23.06.2019 05:00
In cell b18, enter a formula to calculate the amount budgeted for meals. this amount is based on the daily meal allowance and the total travel days (# of nights+1).
Answers: 1
question
Computers and Technology, 24.06.2019 01:00
Answer these and get 40 points and brainliest
Answers: 1
question
Computers and Technology, 24.06.2019 23:30
Does anyone have the problem where you try to watch a video to get your answer but it brings up a thing asking your gender to make ads relevant but it doesn't load? btw i won't be able to see the answer so use the comments .
Answers: 1
You know the right answer?
With some questions. you!

question 1:

errors can be syntax errors or logi...
Questions