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
lina2011 [118]
3 years ago
10

Write a program that has a user guess a secret number between 1 and 10. Store the secret number in a variable called secretNumbe

r and allow the user to continually input numbers until they correctly guess what secretNumber is. Complete the method guessMyNumber that uses a while loop to ask the user for their guess and compares it againist secretNumber. For example, if secretNumber was 6, an example run of the program may look like this:_______.
Computers and Technology
1 answer:
Tom [10]3 years ago
5 0

Answer:

Explanation:

The following code is written in Python. It is a function called guessMyNumber and like requested creates a random number and saves it to secretNumber. Then it continuously asks the user for their guess and compares it to the secret number. If the guess is correct it exits the loop otherwise it will continue to ask for a new guess.

import random

def guessMyNumber():

   secretNumber = random.randint(1, 10)

   print(secretNumber)

   while True:

       guess = input("Enter your guess: ")

       guess = int(guess)

       if (guess == secretNumber):

           print("Congratulations you guessed correctly")

You might be interested in
Which of the following describe the characteristics of a good logo? Choose all that apply. It is a complex design It is memorabl
nasty-shy [4]

Answer:

It is memorable.

It utilizes the elements of design.

Explanation:

IMO these 2 will determine a good logo. Since everyone should remember it if they come across it again in the future

6 0
2 years ago
A(n) _________ is any system resource that is placed onto a functional system but has no normal use for that system. If it attra
Kisachek [45]

Answer:

Honeytoken

Explanation:

Honeytokens (aka honey traps or honeypots) may be described as bogus or dummy IT resources which are created or placed in a system or network for the sole purpose of attracting the attention of cyber-criminals and being attacked. These might be servers, applications, complete systems or datasets which are placed online (via the public internet, or a public-facing gateway to a private network), in order to attract cyber-attackers.

Honeytokens may be specifically defined as pieces of data which on the surface look attractive to potential attackers, but actually have no real value – at least, not to the attacker. For the owners of the tokens (i.e. the people who set the trap), they can be of great value, as they contain digital information which is monitored as an indicator of tampering or digital theft.

8 0
3 years ago
Help!!!!!!!!!!!!!!!!!
damaskus [11]
The orders are 3465172 hope this helps
6 0
3 years ago
What is an administrator?
Drupady [299]
A person responsible for running a business, organization, etc.
3 0
3 years ago
Which button should be utilized if a user is unsure whether or not they are the right person to reply to an email?
Triss [41]

Answer:

its either a or c

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • Gina's teacher has sent her a Word document that contains the names of all the students who are participating in the
    11·2 answers
  • Which statement about trees is false?
    12·1 answer
  • PLEASE HELP POWER POINT:
    8·2 answers
  • (BRAINLIEST QUESTION) What are some challenges that will need to be overcome in order for the Internet of Vehicles to become a r
    13·1 answer
  • One page of content in a PowerPoint presentation is referred to as a
    12·1 answer
  • What is the name of the most expensive car and how much is it and what are its features
    15·1 answer
  • Convert 78 to binary
    6·2 answers
  • At the beginning of a chapter in a book, the first letter often appears larger than the other text on the page. This
    15·1 answer
  • Explain what led to the invention of lasers
    7·1 answer
  • Ethics related to all <br> artificial intelligence?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!