1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ghella [55]
2 years ago
6

Can someone help me debug this please

Computers and Technology
1 answer:
Ludmilka [50]2 years ago
4 0
Based on what I’m seeing, It seems like in the string of line 11 you’ve put “What is your first item?” When it should be “What is you second item”.

Word of advice: It’s would be best if you write your consent variables in camel case. It’s helps with debugging and over all helps a reader easily understand what your coding.
You might be interested in
PACIFIC NORTHWEST
poizon [28]

Answer:

b) Tufts University Nutrition Web Page

Explanation:

The site that most likely provides a balanced information on eating a balanced diet is the Tufts University Nutrition Web Page

Tufts University is a moderate size, leading private research American higher education institution located in Massachusetts that offers degree programs on Food and Nutrition Policy and Programs

By comparison with the other sites which are;

a) Pork Producers Nutrition Page, which is expected to be related with pork production pork producers and pork consumers, based on the title focus, the information provided by the page is therefore, not meant for general use and therefore not meant to be balanced

c) The Eat What You Want Page, based on the of the page title literally which suggest the liberty for a user to eat what they want to eat does not appear to call for the input of an expert advice on nutrition, and therefore is not balanced.

8 0
3 years ago
Help with some questions. Thank you!
Oksana_A [137]

Answer:

1. E: II and III only

2. A: (int)(Math.random() * (upper − lower) ) + lower

3. A: The value of answer is N

4. E: while( !(userGuess == secretNumber) && numGuesses <= 15 )

5. C: 21

Explanation:

1. Which of the following is equivalent to while(userGuess != secretNumber)?

I. while( userGuess < secretNumber && userGuess > secretNumber)  

NO - This will test until the userGuess is smaller AND greater than the secretNumber, at the same time... so that condition will never be true.

II. while( userGuess < secretNumber || userGuess > secretNumber)

YES - This will test the value of userGuess and see if it's smaller OR greater than secetNumber.  So, it will loop until the user guesses right.

III. while( !(userGuess == secretNumber) )

YES, this will negate the match with the secretNumber.  In order words, if it's not a match, it will return true... so the loop will run until it finds a false condition (a match).

As you can see, only II and III are valid.

2.  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

Since the lower limit is INCLUSIVE, we mustn't add one to the lower limit.  Also, the Math.random() function returns a value that matches our needs; it returns a value between [0,1[ (meaning the 0 is included, but not the 1).

Assuming the (int) caster does return only the integer portion doing a round down of the result, we'll be perfect.

3. What conclusion can be made about the state of the program when the while loop terminates?

while(!answer.equals( "N"))

{.....

A: The value of answer is N

The condition in the loops reads as "While the negation of the answer being 'N', loop".  If the answer equals 'N' then the method should return true... which will be negated by the '!' operator, causing the condition to be false. Thus we know that if the loop ends, the value of answer contains 'N', any other value will keep the loop going.

4. 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?

E: while( !(userGuess == secretNumber) && numGuesses <= 15 )

This modified condition will first test to see if the user has guessed the secretNumber (if he has, the first sub-parenthesis will be true... so the left side of the && operator will be false due to the negation operator.  The right side of the && operator will check to see how many tries have been attempted. Since the counter starts at 1, it needs to go up to 15 inclusively... so the <= is the right comparison operator.

5. After execution of the following code segment, what will be displayed?

int x = 1;

while(x < 18)

{

x += 5;

}

System.out.println(x);

C: 21

The x variable is initialized with 1... then enters the loop, in which it is incremented by 5 at each passage.

So after first passage, x = 6

After second passage, x = 11

After third passage, x = 16

After fourth passage, x = 21

Cannot enter the loop again because 21 > 18.

So, it will print out the value of 21.

3 0
3 years ago
In addition to telling you which programs are currently running, what other information does the task bar display
faust18 [17]

I've got task manager open right now; it shows you

  • Applications
  • Processes
  • Services
  • Performance
  • Networking
  • Users

(In that order)

6 0
3 years ago
A(n ____ is information that a web server stores on a client computer, such as the client’s preferences when accessing a particu
gayaneshka [121]
<span>A COOKIE is information that a web server stores on a client computer, such as the client’s preferences when accessing a particular web site, or where the client has been on the web site.</span>
7 0
3 years ago
Space cushion includes
Ulleksa [173]

Answer:

D. sides

Explanation:

Space cushion includes sides of your vehicle.

8 0
3 years ago
Read 2 more answers
Other questions:
  • . A register in a computer has a of bits. How many unique combinations can be stored in the register?
    5·1 answer
  • 2. Statement: "I don't agree with you." Nonverbal gesture: Type of gesture:
    6·1 answer
  • Which statement best represents the denotation for the word “woman”? A woman is an adult human female. Both man and woman are re
    11·2 answers
  • The partners of a small architectural firm are constantly busy with evolving client requirements. To meet the needs of their cli
    11·1 answer
  • A stateless firewall inspects each incoming packet to determine whether it belongs to a currently active connection.
    9·1 answer
  • What is abbreviation of the computer​
    15·2 answers
  • What subject did this person struggle in, "I ain't never gonna nead to no this stuff."
    11·1 answer
  • What type of app is Drake designing? Drake is designing a mobile app for an online travel blog. The app will enable browsers to
    5·1 answer
  • Which of these can be a problem for people with accessibility issues? Select 4 options.
    7·1 answer
  • What is System Testing
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!