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
Maslowich
3 years ago
14

What kind of loop should be used in a game where the user is guessing a secret code and the message"guess again" appears until t

he user guesses correctly?
Computers and Technology
1 answer:
GenaCL600 [577]3 years ago
3 0

Answer:

While loop

Explanation:

It should be noted that the number of times which the computer will ask the user to take a guess is not known.

When we have a condition like this, the while loop (or in some programs; the do-while loop) is to be used.

To further back my point, see the following program in python.

<em>secret_code = 1234</em>

<em>user_guess = int(input("Take a guess: "))</em>

<em>while user_guess != secret_code:</em>

<em>     user_guess = int(input("guess again: "))</em>

<em>print("You guessed right")</em>

<em />

The above program will keep asking the user to take a guess until the user enters 1234.

<em>This may or may not be possible with a for loop.</em>

You might be interested in
How many atoms of oxygen in 4 molecules of HN03​
Ganezh [65]

Answer:12 oxygen atoms are in 4 molecules of HNO3

Explanation: the amounts of atoms of all the component in HNO3, which are 1 atom of Hydrogen, 1 atom of Nitrogen and 3 atoms of Oxygen.

5 0
2 years ago
7.
lina2011 [118]

Answer:

16GB RAM

Explanation:

4 0
2 years ago
You have found statistics on the Internet that you would like to use in your speech.
miss Akunina [59]

Answer:

You cite them correctly and that the statistics are real.

Explanation:

5 0
3 years ago
Primary storage is electronic storage connected directly to the CPU. true or false​
Helen [10]

Answer:

I think it's true

Explanation:

I don't know but If I'm wrong tell me?

7 0
2 years ago
Discuss two advantages and two disadvantages of agile methods
Fofino [41]

Answer:

Two advantages of the agile methods are:

  • The agile method require less documentation process as compared to waterfall model and saves maximum time and money. It basically reduces the efforts and the amount of work.
  • In agile method, there is always high customer satisfaction present. In agile method, it is easy to modify in the data as compared to the waterfall model. The customers and developers always interact with each other as the interaction is very important for the good results in the project.

Two disadvantages of the agile methods are:

  • For the large and complex projects, sometimes it is difficult to determine the requirements in the software development as projects are easily go off track.
  • There is less predictability and the projects are easily messed up if the projects requirement are not clear by the customer end.

6 0
3 years ago
Other questions:
  • To move to the bottom of a document window, press the ____ key(s). ALT CTRL PAGE DOWN CTRL PAGE DOWN ALT PAGE DOWN PAGE DOWN
    11·1 answer
  • In the 2007/2010 version of Paint, which of the following tools are located in the View tab? (Select all that apply.)
    5·1 answer
  • What mass of nh3 can be made from 35g of n2?
    14·1 answer
  • If $hourlyWage contains the value 10.00 and $hoursWorked contains the value 20, what value will $bonus contain after the followi
    11·1 answer
  • you are concerned with security at your company and want to implement a technology that requires no configuring on the users sid
    15·1 answer
  • _____ is a systems development technique that produces a graphical representation of a concept or process that systems developer
    11·1 answer
  • In cell n2, enter a formula using the if function and a structured reference to determine if allison simoneau is eligible for tu
    11·1 answer
  • Which is the most popular language used in game programming?
    5·2 answers
  • Analog computers are general purpose computers : true ? or false ?​
    8·1 answer
  • Uh can somebody help me
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!