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
kaheart [24]
3 years ago
5

Write a program that plays a reverse guessing game with the user. The user thinks of a number between 1 and 10, and the computer

repeatedly tries to guess it by guessing random numbers. It’s fine for the computer to guess the same random number more than once. At the end of the game, the program reports how many guesses it made.
Computers and Technology
1 answer:
nika2105 [10]3 years ago
4 0

Answer:

  1. import random  
  2. target = 7  
  3. count = 0
  4. for i in range(100):
  5.    guess = random.randint(1,10)  
  6.    
  7.    if(guess == target):
  8.        count += 1
  9. print("Total of correct guess: " + str(count))

Explanation:

The solution is written in Python 3.

Firstly, import the random module since we are going to simulate the random guess by computer. Next, we presume user set a target number 7 (Line 3). Create a counter variable to track the number of correct guess (Line 4).

Presume the computer will attempt one hundred times of guessing and we use randint to repeatedly generate a random integer between 1 - 10 as guess number (Line 6). If the guess number is equal to the target, increment count by one (Line 8-9).

Display the total number of right guess to terminal (Line 11).  

You might be interested in
The online underground is used _____. Select 3 options. by law-abiding citizens only on Black Friday for networking by criminal
makvit [3.9K]

Answer:

The online underground is used :- 1] by cybercriminals to purchase malicious software.

2] by cybercriminals to sell ransom services.

3] by criminal organizations.

I hope it's correct.

6 0
3 years ago
In order to create strong neural networks (connections) in your brain, you've got to __________ the learning process.
sleet_krkn [62]

Answer:

A. Participate actively in

Explanation:

The brain starts to develop even before a child is born and continues into adulthood. During the first few first years of a child's life, neurons, synapses and axon are multiplied to millions. The child's learning process determines the neural connections to be cut off by pruning. An active connection is retained while inactive neurons, synapses and axons are eliminated.

As the child grows, neural connections are strengthened by active participation in the learning process. But when these connections are left idle, they tend to decay.

8 0
3 years ago
Which type of computer is the fastest?
yawa3891 [41]
Supercomputer because they are like hundreds of computers in one they also use them at NASA and stuff
7 0
3 years ago
Who invented different photo-capture methods in photography?
geniusboy [140]

Answer:

However, it wasn't until the 19th century that a breakthrough occurred. The world's earliest successful photograph was taken by French inventor Joseph Nicéphore Niépce in 1826. As such, Niépce is considered the world's first photographer and the true inventor of photography as we know it today.

Explanation:

7 0
3 years ago
Write chracteristics of all 5 generation of computer​
jeka94

Answer:

First generation — 1940–1956

-used vacuum tubes

ENIAC, UNIVAC I, IBM 650, IBM 701 etc.

mainframes taking up entire rooms

punched cards I/O

electrostatic and mercury delay line memory, beginning use of core

Second generation — 1956-1963

-used discrete transistors

IBM 7090 and 7094, UNIVAC 1107, PDP-1 and 8, etc.

first appearance of minicomputer (PDP-8)

punched cards I/O and line printers (mainframe), TTY (minicomputers)

core memory, magnetic tape for mass storage

Third generation — 1964-1971

-used integrated circuits

IBM System/360, UNIVAC 1108, PDP-8/I, PDP-11/20 and PDP-11/45, etc.

mostly same I/O and memory as second generation

Fourth generation — 1971-present

-use microprocessors

PDP-11/03 and PDP-11/34, Apple ][, IBM PC, Apple Macintosh, IBM z Series, etc.

transition from minicomputers to personal computers

video terminals used for I/O, specialty computer printers developed

fewer mainframes

semiconductor memory replaces core memory

hard drives and optical drives replace magnetic tape for mass storage, followed by solid-state drives (SSD)

Fifth generation — (current research)

-artificial intelligence and quantum computing

3 0
3 years ago
Read 2 more answers
Other questions:
  • What is heat sink?what is its use?If it is not in the system what will happen?
    12·1 answer
  • Why is fluency in information technology becoming increasingly important for many college majors?
    9·2 answers
  • Open Comments.java and write a class that uses the command window to display the following statement about comments:
    8·1 answer
  • Which is the most likely reason film companies expanded so quickly?
    8·1 answer
  • Convert the ProjectedRaises class to an interactive application named ProjectedRaisesInteractive. Instead of assigning values to
    15·1 answer
  • How is an API different from a web application?
    10·1 answer
  • TIME REMAINING
    9·1 answer
  • Choose the best function for the purpose.
    11·1 answer
  • Cuantos puntos de habilidad se puede tener en clubes pro?
    9·1 answer
  • Which design monument beginning with A inspired the chrysler building in New York​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!