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
Can you help me with this question please ​
Flura [38]
D. half period because it is the converting of bidirectional current flow to unidirectional currency flow.
3 0
3 years ago
Which of the following best describes a hotspot as
Ierofanga [76]

A statement which best describes a hotspot as used in the Action feature of PowerPoint is: B. an invisible hyperlink embedded in a slide.

<h3>What is a hotspot?</h3>

A hotspot can be defined as a visual effect that can be applied in Microsoft PowerPoint to content on a slide, so as to make elements (objects) interactive with the end users.

This ultimately implies that, an invisible hyperlink embedded in a slide is a statement which best describes a hotspot as used in the Action feature of PowerPoint.

Read more on PowerPoint here: brainly.com/question/26404012

#SPJ1

5 0
1 year ago
8.3 code practice edhesive PLEASE HELP AND HURRY
NemiM [27]

Answer:

numbers = '14 36 31 -2 11 -6'

nums = numbers.split(' ')

for i in range(0, len(nums)):

  nums[i] = int(nums[i])

print(nums)

8 0
3 years ago
Full from of tmc computer
Butoxors [25]

Answer:

Traffic Message Channel,

7 0
3 years ago
Read 2 more answers
What landforms are likely to form at this boundary
Paha777 [63]
<span>Landforms that could be created at convergent boundaries would consist of: volcanoes, mountains, trenches, volcanic islands, and even deserts could result from effects of converging boundaries. The landforms are mountains.</span>
3 0
3 years ago
Other questions:
  • What was the second phone?
    14·1 answer
  • Pinterest is most useful for?
    10·2 answers
  • What are three new things in Microsoft Word 2016?
    5·1 answer
  • The Internet shopping cart is an example of which version of the web?
    15·1 answer
  • The interaction between information technology and organizations is influenced___________.A) solely by the decision making of mi
    12·1 answer
  • What was one complication caused by the tsunami that struck japan in 2011?
    15·1 answer
  • Convert 15 from decimal to binary. Show your work.
    14·1 answer
  • Suppose you own a travel agency in a large city. You have many corporate clients, but growth has slowed somewhat Some long-term
    15·1 answer
  • In this exercise, you will get some practice with the __add__ method by implementing it for a class called ContactBook. This cla
    12·1 answer
  • Write a static method reOrder56(int[] nums) that return an array that contains exactly the same numbers as the given array, but
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!