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 feature of vitualization helps increase the IT productivity of a business?
laila [671]
A the answer is yes
7 0
3 years ago
In a PERT network, non-critical activities that have little slack need to be monitored closely
kozerog [31]

Answer: b)because near-critical paths could become critical paths with small delays in these activities

Explanation: Program evaluation and review technique(PERT) technique is used for management of the project .The organizing, maintenance,coordination of any task is done by this chart. The non-critical activities need to be observed carefully because they may create near-critical methods which can lead to complexity.

Other options are incorrect because not all activities are equally rather monitoring is done to avoid errors and slack can occur at any path . Small delays can be caused but not complete project can get delayed and there can be risk of complexity rather than being uncompleted.Thus, the correct option is option(b).

6 0
3 years ago
What is an aptitude assessment that matches students with study programs at specific colleges and universities?
melisa1 [442]
I think the correct answer would be FOCUS2. It is a system that guides members in choosing college or a major. It provides a starting point for students who are not yet certain of what they want to take academically. Hope this helps.
5 0
3 years ago
Read 2 more answers
The __________ energy in food is changed into mechanical energy by your muscles.
qwelly [4]
The chemical energy in food is transformed into mechanical energy through a process called respiration. This isn't really a computers and technology question though. Try Biology next time.
4 0
2 years ago
_________ is a society organized with the purpose of rendering service to its members and to the public in general.
sesenic [268]

Answer:

cooperate society

Explanation:

A cooperative society is a voluntary association that started with the aim of the service of its members.

8 0
2 years ago
Other questions:
  • When an ethernet nic has been configured by os to use half-duplex, the transmit pair of the twisted-pair cable uses?
    8·1 answer
  • What can search the Internet and select elements based on important words?
    6·2 answers
  • Which small-group format would be most appropriate for the following situation? A large sporting event is coming to town. Key me
    14·2 answers
  • Adjust list by normalizing When analyzing data sets, such as data for human heights or for human weights, a common step is to ad
    7·1 answer
  • 8.Which of the following IC was used in third generation of computers?Immersive Reader
    13·1 answer
  • You are to calculate the property tax for tax payers. You will ask the county tax clerk if they want to run the program and init
    9·1 answer
  • You were just hired as an IT Specialist for Smalltown School District. Your first assignment is to review a problem area& in
    11·1 answer
  • What are the small squares that appear in the corners and in the middle of the sides of a selected object's border called?
    7·1 answer
  • Online activities among businesses
    9·1 answer
  • a network administrator for a large oil company has discovered that a host on the company network has been compromised by an att
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!