subject

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: 32 45 48 80 the output is: 32 is too low. Random number was 80. 45 is too high. Random number was 30. 48 is correct! 80 is too low. Random number was 97. LAB ACTIVIT 6.9.1: LAB: Guess the random number 0/10 | main. py Load default template... 1 # TODO: Import the random module 2 import random 3 def number_guess(num): # TODO: Get a random number between 1-100 # TODO: Read numbers and compare to random number _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)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
What allows you to create a wireless connection among your smart devices
Answers: 2
question
Computers and Technology, 22.06.2019 18:30
Kto rozmawia z clamentain przez krótkofalówke w the walking dead w 4 epizodzie
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
The graph shows median weekly earnings for full-time workers according to education level. which can you not conclude?
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
You have been supporting csm tech publishing's windows server 2016 server network for over a year. the office has two windows server 2016 servers running active directory and a number of other roles. management has informed you that a small sales office is opening in the same building three floors up. the sales manager wants to install a sales application on a server located in the sales office. this server will have limited physical security because there's no special room dedicated for it, which means it will be accessible to non-it personnel and visitors. you're considering installing windows server 2016 server core on the new server because accessing its console regularly probably won't be necessary, and this server will be managed from one of the other csm tech publishing servers. what are the benefits and drawbacks of using server core for this branch office? what are some things you should do to set up this server management environment?
Answers: 1
You know the right answer?
Given the code that reads a list of integers, complete the number_guess() function, which should cho...
Questions
question
Mathematics, 12.06.2020 14:57
question
Geography, 12.06.2020 14:57
Questions on the website: 13722360