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
Technician A says that a system should be recharged with refrigerant until the condenser temperature is equal to the ambient tem
Reptile [31]

Answer:

Technician B

Explanation:

The vehicle will always come with a sticker placed under the hood of the AC unit. This sticker has information like the amount of ounces or pounds required for a complete charge. The car’s gauge will state the psi with most gauges having a color bar on the face the appropriate pressure.

6 0
3 years ago
NO LINKS Please
Kamila [148]

Answer:

ok po majsbejwwlaodhd susbvskwmoskwaubsbsiwnwis sisbsbsb is a good 2AM 2AM 2nd edition 2and I am a nanny 2and and u 2122feet 225feet to see how 2nd grade are you 22feet but not yet a lot more because it has alot of people who is the key to the girl in your life of your own life NATO is the most powerful and I was a great person in a sentence and a very nice meeting you had to do nothing babe and she had an affair in a way maker that I am in a relationship with u are in bed now babe and my mom and my dad a lot of my cousn and my kids in the morning and my kids were in the same boat and 5PM was the first of my two 5th grade boys in school to be with u at work now babe on my messenger then the Lord was in bed and she had no probs and no babe to be in Philippines and my kids had to be a good 58 and a little more because I was so happy bday sis had a lot to say about the girl and she was busy with me I will be having dinner with the kids on me sometime next time because she is very good at home now babe ruth is it ur wife is still single forever ni mama ne is a good girl also a big part in her to be the center babe if I will be a good person and I think they 5th 5 and 5 and u have a lot more to lose than me if u have a lot

6 0
2 years ago
Read 2 more answers
In three or four sentences, describe how a person buys and sells stock.
Aleksandr-060686 [28]
In order to buy stock, you must go and find a stock broker. You do not always need a broker, but it is more convenient to have one to manage your stock. It also makes your life in the market easier. The broker will manage your shares and you tell him when you want to buy or sell your stock.
4 0
3 years ago
Read 2 more answers
Lonic compounds are also known as <br> a. salts <br> b. valence <br> c.organic <br> d.elements
shutvik [7]
I'm not quite sure but it maybe b
6 0
3 years ago
Read 2 more answers
What's your opinion on Pokemon​ and pixeldip
faust18 [17]

Answer:

Its a good game but an amazing show. 10/10

Explanation:

7 0
2 years ago
Other questions:
  • The Glow effect adds a blinking border around a chart.<br> t or f
    15·1 answer
  • In this context, the word “session” refers to _____.
    5·2 answers
  • I wanna start answering questions for people, but I don't quite know how. Can you help me?​
    13·1 answer
  • Write a program with total change amount as an integer input, and output the change using the fewest coins, one coin type per li
    11·1 answer
  • Linda wants to apply for a job in a company of her choice. Which information would her potential employers likely review in her
    10·2 answers
  • Microsoft word 2010 lab 6-1
    7·2 answers
  • Avi does not want to save his internet browsing details on his computer. What should he do?
    11·1 answer
  • Jackie is planning a surprise birthday party for her best friend and is researching a location to have the party. Jackie found a
    6·1 answer
  • I'm bad i'm mrs puff doo doo doo yeah it's a holiday
    6·2 answers
  • What is the answer ????​
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!