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
Consider a relation representing the present position of molecules in a closed container. The attributes are the ID for the mole
pshichka [43]

Answer:

See attached picture.

Explanation:

8 0
3 years ago
In terms of data storage and sharing, in what way, if any, do dropbox services differ from archiving services?
ratelena [41]
I believe that the answer is B. 
7 0
3 years ago
A student is curious about how a Web site appears on his computer screen. On a piece of paper,
nata0808 [166]

A student is curious about how a Web site appears on his computer screen. There is a communication between the client and the server in the Application Layer.

Explanation:

  • When we choose to open a webpage (in any browser) the seventh layer of the OSI model - called Application layer will help to do that.
  • What happens after we write the webpage address in address bar is that the Application layer protocol (also called HTTP) formats and sends the request from the client's browser (Internet Explorer, Mozilla Firefox , Opera, Safari etc.) to the server.
  • It also formats and sends the server's respond back to client's browser. This process happens very fast and all the OSI model layers are processing in it (not only the Application layer).
  • All the layers are working together and each of them is responsible for some particular job, but all together they work as one. The layers communicate with each other and in case of error they will retry and fix the error or if they are unable to do it, the responsible layer will inform the user about the source of the problem.
  • What happens when page is requested and received? If we will remove the graphical and visual image and look at the process that computer does. We will see a set of commands, mathematical algorithms, symbols, letters and not understandable codes and processes.
  • When data is sent from "A" to "B", a transport layer is responsible to send and deliver it correctly and exactly the same, what was requested.
  • If the request, processed by "A" (sender) is too long, the transport layer will divide it in segments (called segmentation process) to understand well and not make a mistake while sending the data to "B" (recipient). After this process data is travelling through the network to the "B" (recipient), if the sent data is segmented or divided, the transport layer is responsible for reassemble it again and "B" (recipient) receives its requested data (It can be web page or other data).
  • If the transport layer will not do the segmentation process, then the next - network layer - will check the data and if the requested message is too long it will fragment it (called fragmentation process) and will provide the same as transport layer had to do.
  • All the layers processes are connected to each other and work cooperatively.
5 0
3 years ago
Give the value of the zero flag, the carry flag, the signflag, and the overflow flag after each of the following instructions if
Vanyuwa [196]
The correct answer is A for this question
6 0
2 years ago
1). What is the proper name of the healing agent?
VLD [36.1K]

Answer:

1. Hydroxychloroquine is the healing agent

2. Chloroquine does not have a hydroxyl group attached    

Explanation:              

Chloroquine and  Hydroxy chloroquine have been in use for many decades for malaria treatment and prophylaxis.    

It was found that there was a high possibility of being poisoned when treatment of chloroquine was administered. In 1946 the hydroxyl group replaced the CH3₃  (methyl) group with an ⁻OH (hydroxyl) group as indicated by the attachment. Toxicity by chloroquine was reduced to 40% when the ⁻OH group was attached.

Later chloroquine was added to formulas that are used for cleaning pools and fish tanks.

Both of these chemicals should be used by following the guide lines and under medical supervision if taken for any illness.

3 0
3 years ago
Other questions:
  • In the C-SCAN disk scheduling algorithm, the disk arm is required to move in one direction only until it reaches the last track
    7·1 answer
  • PLEASE HELP ASAP!!!
    15·2 answers
  • You are asked to optimize a cache design for the given references. Th ere are three direct-mapped cache designs possible, all wi
    7·1 answer
  • Write the definition of a class Counter containing: An instance variable named counter of type int. An instance variable named l
    14·1 answer
  • What are the names of the 3 main languages used for making websites
    10·1 answer
  • Customizing ads to people who had earlier visited the site is
    14·1 answer
  • You should always assign the Needs Met rating before assigning the Page Quality rating, T or F ?
    6·2 answers
  • Set screw compression and indenter are all types of
    13·2 answers
  • Submit your business presentation that clearly compares and contrasts three different cell phone service plans. I have TO HAVE I
    14·1 answer
  • Which of the following IS an operating system? *<br> Reddit<br> Ubuntu<br> Office 365<br> Mac Pro
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!