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]
3 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]3 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
How does human error relate to security risks
oksian1 [2.3K]

Answer:

The error could let people through who really shouldn't be through

8 0
3 years ago
Select the phrases that apply to Java classes or methods.
oee [108]

Answer:

graficar una lista de entradas

graficar una lista de entradas

crear un nuevo objeto

condiciones de prueba

romper un ciclo

romper un ciclo

Explanation:

7 0
3 years ago
What is the most complex part of a PC?
rjkz [21]

Answer:

From a hardware standpoint, the CPU is most likely the main component. From a software standpoint, macOS and Windows are complex software systems.

Explanation:

6 0
2 years ago
Software that people commonly use in the workplace to make their lives easier is called?
emmasim [6.3K]
Answer: System Software

7 0
3 years ago
What sorts of routine, seemingly unimportant information would help you learn about or break into another company’s network?
tatuchka [14]

Answer and Explanation:

  • Reboot your Computer from which you need to break into.
  • With your remote Ethernet card embedded and the unprotected passageway will mate up in a flash. You likewise need to change the Service Set Identifier (SSID) on your Ethernet card to coordinate SSID on the system's passage. You can decide to physically constrain your DHCP settings to reestablish, however on the off chance that that gives you any trouble.we need to re-boot it.
  • The Third Man ran a sniffer program that caught the majority of the LAN traffic within this organization. It was transmitted through the remote passageway straight into the Third Man's PC. Passwords. Agreements. Email.
4 0
3 years ago
Other questions:
  • Uma organização pode ser entendida como uma instituição ou associação com objetivos predefinidos. Qual é um dos primeiros concei
    10·1 answer
  • Explain SATA peripheral bus operation?
    14·1 answer
  • which telecommunications service allows internet and telephone service to work over the same phone line
    13·1 answer
  • We will pass in a value N. Write a program that outputs the complete Fibonacci sequence for N iterations. Important: If N is 0,
    13·1 answer
  • 1.<br> The correct way to use a seat belt is
    8·1 answer
  • Which of the following statements is true regarding the e-mails that were collected from Marina and Rita's Cupcakes' key employe
    11·1 answer
  • Select the layer of the OSI model that is responsible for reformatting, compressing, and/or encrypting data in a way that the ap
    14·1 answer
  • Make a webpage that shows news <br>​
    7·1 answer
  • Mha lovers why do other anime lovers report mha lovers for not liking there anime?
    6·2 answers
  • What is this error SyntaxError: Unexpected token '??='
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!