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 22:40
When you type the pwd command, you notice that your current location on the linux filesystem is the /usr/local directory. answer the following questions, assuming that your current directory is /usr/local for each question. a. which command could you use to change to the /usr directory using an absolute pathname? b. which command could you use to change to the /usr directory using a relative pathname? c. which command could you use to change to the /usr/local/share/info directory using an absolute pathname? d. which command could you use to change to the /usr/local/share/info directory using a relative pathname? e. which command could you use to change to the /etc directory using an absolute pathname? f. which command could you use to change to the /etc directory using a relative pathname?
Answers: 3
question
Computers and Technology, 23.06.2019 23:00
Computer programming is one type of what career
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
How do i change the size of my bookmarks in my bookmarks bar in google chrome? ? plz hlp me
Answers: 2
question
Computers and Technology, 25.06.2019 04:00
Plz there is a problem with my account. i no longer have ! ( hand,ambitious,virtuoso etc.) it's like getting brainliest means nothing. how do i get ranks back?
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, 09.12.2019 05:31
Questions on the website: 13722363