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
miskamm [114]
2 years ago
9

Adam is writing a program that: 1) has the user guess a number, and 2) tells the user how many guesses it took to get the correc

t answer. But when Adam tests the program, it always outputs that it took the user one guess, even when it takes many guesses. What error did Adam most likely make, and how should it be fixed? The difference between a for loop and a while loop is that a for loop is a loop that happens for a certain number of times. A while loop happens until a certain condition is met. How do you know when to use each one? Give specific examples in your answer. What are some programs that you have used that have condition-controlled loops and count-controlled loops? Why is it important that if, elif, and else statements appear in the proper order? What are some situations where you might find it useful to use the “!” symbol in a program?
Computers and Technology
2 answers:
nadezda [96]2 years ago
6 0

Answer:

Adam most likely forgot to add a while loop to the guessing code or didn’t add it properly, meaning that instead of letting him guess multiple times it just continues the code, all he needs to do is add a while loop to fix the line of code.  

Explanation:

hope this helps

NNADVOKAT [17]2 years ago
5 0

Answer:

There are two ways in which programs ... count-controlled loops; condition-controlled loops ... Sometimes it is necessary for steps to iterate a specific number of times. ... A count-controlled loop is used when the number of iterations to occur is ... the variable 'count' is used to keep track of how many times the algorithm

Explanation:

You might be interested in
Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending whe
Nana76 [90]

<u>Answer:</u>

<em>using System; </em>

<em>public class Program </em>

<em>{ </em>

<em> public static void Main() </em>

<em> { </em>

<em> String input ; </em>

<em> while(true) </em>

<em> { </em>

<em>  input = Console.ReadLine(); </em>

<em>  if(input.Equals(""quit"")) </em>

<em>  break; </em>

<em>  Reverse_String(input); </em>

<em> } </em>

<em> return; </em>

<em> } </em>

<em>static void Reverse_String(string input_text) </em>

<em>{ </em>

<em>    char[] text = input_text.ToCharArray(); </em>

<em>    Array.Reverse(text); </em>

<em>    Console.WriteLine(text); </em>

<em>} </em>

<u>Explanation:</u>

<em>In the above program a separate function is written to reverse the string.</em>

This method takes the string as an argument and place it in a array and then use the built-in function reverse and print the reversed string in the console.

<em>In the main(), the input is obtained from the console and it is passed to the reversestring(). </em>

7 0
3 years ago
Read 2 more answers
Lonnie has several workbooks that contain financial and sales data. He needs to ensure that if the data in a single cell in one
Rzqust [24]

Answer: Linked cell

Explanation: I just did a test

7 0
3 years ago
The marketing company era marks the time when companies realized they needed to switch from just trying to sell
djverab [1.8K]

Answer:

False

Explanation:

I hope this is right

7 0
2 years ago
Which option can you use to control how text flows around a graphic?
Art [367]

Answer:

I believe your answer is C: Wrap Text

Explanation:

If you are trying to put an image in a more specific placement you would use Wrap Text. It helps making the image more clear and understandable because without wrapping the text it wouldnt make any sense and it would just be plain.

Hope this helps

3 0
3 years ago
Read 2 more answers
How many times is the text "Let's have fun with Java." printed when this code snippet is run? int i = 0; do { System.out.println
mash [69]

Answer:

The above code print the text at three times.

Explanation:

  • It is because the above code has one loop which executes three times. The loop executes for the value of i = 0,1 and 10.
  • when the value of i is 0 then "++i" will increase the value 1 and the text will be printed.
  • If the value of i=1, then the value of i is 2 in the second iteration and the again the text is printed, then the if condition gives the true result and the value of i will be 10.
  • Then the loop executes for the last time when the value of i is 10.Then the value will be 11 because of the increment operator and the text will be printed for the third time.
  • Then the while loop is not true for the 11 value of i and the loop will get terminated.
8 0
3 years ago
Other questions:
  • The support group at Universal Containers wants agents to capture different information for product support and inquiry cases. I
    14·1 answer
  • witch of the following is a good way to choose your location as you develop your study method? A. Going where most of your frien
    6·1 answer
  • A ____ appearing in the main text of a document indicates a footnote or endnote.
    15·1 answer
  • How do ethics affect people?
    15·1 answer
  • How can you create the first row of the table as the header of the table?
    14·2 answers
  • How does the Rights Management Services feature help to protect information
    11·1 answer
  • (PYTHON) Write a program that uses this technique to read a CSV file such as the one given above. Display the IDs and names of t
    14·1 answer
  • . Two blue armies are each poised on opposite hills preparing to attack a single red army in the valley. The red army can defeat
    5·1 answer
  • Discuss briefly four types of websites and the criteria you will use to evaluate the content of a website
    8·1 answer
  • A(n) ____________________ key is a key that is not reused, but rather is only used once, thus improving security by reducing the
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!