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 11:00
In the context of the box model, what is the difference between a margin and a padding? a. a padding lies outside a box border, while a margin lies inside it. b. a padding lies inside a box border, while a margin lies outside it. c. a padding can be adjusted independently, while a margin depends on the size of its box. d. a padding depends on the size of its box, while a margin can be adjusted independently.
Answers: 3
question
Computers and Technology, 24.06.2019 05:30
Someone plzz me which of these defines a social search? a. asking a search engine a question that is answered by a real person on the other sideb. modifying search results based on popularity of a web pagec.modifying search results based on a ranking of a web page
Answers: 2
question
Computers and Technology, 24.06.2019 23:30
Adrian has decided to subscribe for a new internet connection. he wants a high speed connection so that he can stream video content smoothly. which access technology would you advise adrian against using?
Answers: 1
question
Computers and Technology, 25.06.2019 00:00
When pasting an existing chart into a word document, you can choose to using the paste options button. a. paste the chart as a picture b. embed the chart c. add the chart while keeping the destination formatting intact d. insert the chart while keeping the source formatting intact
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, 07.12.2020 07:40
question
Mathematics, 07.12.2020 07:40
question
Chemistry, 07.12.2020 07:40
question
Chemistry, 07.12.2020 07:40