subject
Computers and Technology, 02.03.2020 22:53 MaiiR01

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.
What is the correct code to reach this output?

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 06:40
How many nibbles can be stored in a 16-bit word?
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
What is the process in which the software development team compiles information to determine the final product
Answers: 1
question
Computers and Technology, 24.06.2019 10:30
You're programming an infinite loop. what must you include in your code to prevent crashes? in roblox
Answers: 2
question
Computers and Technology, 24.06.2019 18:30
Jacking is a crime that takes place when a hacker misdirects url to a different site. the link itself looks safe, but the user is directed to an unsafe page
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, 06.11.2020 01:00
question
Mathematics, 06.11.2020 01:00
question
English, 06.11.2020 01:00
Questions on the website: 13722360