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
Jennifer, a customer, informs you that unexpected icons are appearing on her system's desktop. You identify the symptoms of the
Maslowich

Answer:

B. Schedule scans and run updates.

Explanation:

With a malware infection you have to scan the computer with an antivirus immediately. Then, you run possible updates to get the system stronger.

8 0
4 years ago
7. Suppose that a RISC machine uses 5 register windows. a. How deep can the procedure calls go before registers must be saved in
Semenov [28]

Answer:

bbbbbbbbbbbbnbbnnnnnnnnnnnnnnnnn

6 0
2 years ago
What are two characteristics of switches? (Choose two.) * 1 point A. Switches identify the intended destination of the data that
tigry1 [53]

Answer:

A. Switches identify the intended destination of the data that they receive. And C. Switches are capable of sending and receiving data at the same time

Explanation:

Switches can be used as inputs (Analog), or outputs (digital). These inputs and outputs are signals that the switches send or receive- Or at least as push button switches... But the same applies to network switches.

Hope this helps! Have a great day!

7 0
3 years ago
Select the correct answer.
Nataly [62]

Answer:

B. is grayed out

Explanation:

ALL HIDDEN FOLDERS > GRAYED OUT

7 0
3 years ago
Which of the following items is an example of a user application? *
aleksandr82 [10.1K]

Answer:

I would probably say all of the above!

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • Create a class CitiesAndCountries with at least three methods: class CitiesAndCountries: def add_country(self, country_name): ""
    7·1 answer
  • Write a program that opens a text file and reads its contents into a queue of characters. The program should then dequeue each c
    11·1 answer
  • Write a function named sortie that takes three integer parameters by reference and rearranges them in ascending order--the first
    6·1 answer
  • The Nigerian 4-6-9 scam refers to a fraudulent activity whereby individuals claiming to be from a foreign country will promise a
    11·1 answer
  • What is analog computer?​
    14·1 answer
  • What is the page table mainly for?
    8·1 answer
  • Analyzing the role of elements in audio editing and Video
    7·1 answer
  • Only the one dose audio editors and video editors know this
    9·2 answers
  • Select the functions in the Insert tab in PowerPoint.
    8·1 answer
  • Why is internet download speed slower on a computer vs phone
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!