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
natulia [17]
4 years ago
6

Given the code that reads a list of integers, complete the number_guess() function, which should choose a random number between

1 and 100 by calling random.randint() and then output if the guessed number is too low, too high, or correct. Import the random module to use the random.seed() and random.randint() functions. random.seed(seed_value) seeds the random number generator using the given seed_value. random.randint(a, b) returns a random number between a and b (inclusive). For testing purposes, use the seed value 900, which will cause the computer to choose the same random number every time the program runs. Ex: If the input is:
Computers and Technology
1 answer:
Cerrena [4.2K]4 years ago
5 0

Answer:

see explaination

Explanation:

import random

def number_guess(num):

n = random.randint(1, 100)

if num < n:

print(num, "is too low. Random number was " + str(n) + ".")

elif num > n:

print(num, "is too high. Random number was " + str(n) + ".")

else:

print(num, "is correct!")

if __name__ == '__main__':

# Use the seed 900 to get the same pseudo random numbers every time

random.seed(900)

# Convert the string tokens into integers

user_input = input()

tokens = user_input.split()

for token in tokens:

num = int(token)

number_guess(num)

You might be interested in
A security operation center (SOC) analyst investigates the propagation of a memory-resident virus across the network and notices
masya89 [10]

A type of virus that influences this circumstance in the network bandwidth is a worm.

<h3>What is Virus in technology?</h3>

In computers and technology, viruses may be characterized as a sort of malicious software, or malware, that extends between computers and provokes a deterioration of data and software either partially or completely.

The complete question is as follows:

  • A micro virus
  • a multipartite virus
  • A worm
  • a program virus.

Worms are memory-resident viruses that duplicate over the network resources. The primary consequence of this type of virus is to rapidly eradicate network bandwidth with its duplication.

This virus may also be competent to accomplish a Denial of services invasion by slamming O.S and servers.

Therefore, the correct option for this question is C, i.e. a worm.

To learn more about Computer viruses, refer to the link:

brainly.com/question/26128220

#SPJ1

5 0
2 years ago
What is a stereo type?
Aleks04 [339]

Hello!

A stereotype is a generalized belief about a particular category of people.

 

3 0
4 years ago
Read 2 more answers
Visual media that gives the appearance of a movement can be a collection of graphics<br>​
krok68 [10]

its called animation, a collection of a movement of graphics.

6 0
3 years ago
Read 2 more answers
What will happen when a user attempts to login to salesforce from an ip address that is outside the login ip range on the user's
podryga [215]

Answer:

The answer to this question is option "d".

Explanation:

The answer is user will not be able to login at all. The user wants to log in to the salesforce by its IP address. But in the server, all the IP addresses will be registered for their special work. When the user inserting their IP address to log in to the salesforce. The first server will be checking into there database. If IP address doesn't match it will not permit to access salesforce because in their server it is not a valid IP address. It is registered in sever but not for this user.

So the answer to this question is option "d".

7 0
3 years ago
Ivy is a student. She is looking for some freelance assignments during her vacation. Which of the following networking sites can
lara [203]

The answer is D. XING


3 0
3 years ago
Other questions:
  • What is the maximum amount that OSHA can impose as a penalty on an employer for each Willful violation?
    11·1 answer
  • The identification of critical information is a key part of the OPSEC process because: a) It is required by the JTF commander to
    13·1 answer
  • Hy i am new anybody here​
    10·2 answers
  • Although you can use a dialog box to indent paragraphs, word provides a quicker way through the ____.
    7·1 answer
  • In each iteration, selection sort (small) places which element in the correct location?
    9·1 answer
  • You turn your computer on and the computer will not boot up. What is something you should do to diagnose the problem?
    6·2 answers
  • Explain with the help of an example that family background affects the entrepreneurial behaviour of people
    12·1 answer
  • To gain a competitive edge this year, the upper management of a global IT company has decided to focus on customer service, empl
    13·1 answer
  • What icons in the toolbar change the look of the presentation text? It’s either Drawing, Formatting,Presentation, or Standard
    9·2 answers
  • Give an example of an occasion when you used logic to solve a problem
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!