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
natita [175]
3 years ago
6

A file named numbers.txt contains an unknown number of lines, each consisting of a single positive integer. Write some code that

reads through the file, ignoring those value that are not bigger than the maximum value read up to that point. The numbers that are NOT ignored are added, and their sum stored in a variable called runsum. For example, if the sequence of integers in the file were "9 7 5 18 13 2 22 16" the code would ignore: 7, 5, 13, 2 and 16; it would add 9, 18, and 22, storing their sum, 49, into runsum.
Computers and Technology
1 answer:
Nadusha1986 [10]3 years ago
7 0

Answer:

What language?

Explanation:

You might be interested in
What will happen when a user attempts to login to salesforce from an ip address that is outside the login ip range on the user's
podryga [215]

Answer:

The answer to this question is option "d".

Explanation:

The answer is user will not be able to login at all. The user wants to log in to the salesforce by its IP address. But in the server, all the IP addresses will be registered for their special work. When the user inserting their IP address to log in to the salesforce. The first server will be checking into there database. If IP address doesn't match it will not permit to access salesforce because in their server it is not a valid IP address. It is registered in sever but not for this user.

So the answer to this question is option "d".

7 0
3 years ago
An object reference provides a(an)______for an object and is used to gain access to the object (Points : 2) entry
sdas [7]

Answer: Instance

Explanation: Instance is the term found in the object-orient programming concept. It is used for the realization of the variation present in any object specifically.The program execution at each time instant is known as the instance of program. Generation of realized instance is known as instantiation.

This helps in the accessing of the object in the program.Other options are incorrect entry , target and handle are not the technical term related with the accessing of object .Thus the correct answer is instance.

3 0
3 years ago
A computer retail store has 15 personal computers in stock. A buyer wants to purchase 3 of them. Unknown to either the retail st
Dima020 [189]

Answer:

a. 1365 ways

b. Probability = 0.4096

c. Probability = 0.5904

Explanation:

Given

PCs = 15

Purchase = 3

Solving (a): Ways to select 4 computers out of 15, we make use of Combination formula as follows;

^nC_r = \frac{n!}{(n-r)!r!}

Where n = 15\ and\ r = 4

^{15}C_4 = \frac{15!}{(15-4)!4!}

^{15}C_4 = \frac{15!}{11!4!}

^{15}C_4 = \frac{15 * 14 * 13 * 12 * 11!}{11! * 4 * 3 * 2 * 1}

^{15}C_4 = \frac{15 * 14 * 13 * 12}{4 * 3 * 2 * 1}

^{15}C_4 = \frac{32760}{24}

^{15}C_4 = 1365

<em>Hence, there are 1365 ways </em>

Solving (b): The probability that exactly 1 will be defective (from the selected 4)

First, we calculate the probability of a PC being defective (p) and probability of a PC not being defective (q)

<em>From the given parameters; 3 out of 15 is detective;</em>

So;

p = 3/15

p = 0.2

q = 1 - p

q = 1 - 0.2

q = 0.8

Solving further using binomial;

(p + q)^n = p^n + ^nC_1p^{n-1}q + ^nC_2p^{n-2}q^2 + .....+q^n

Where n = 4

For the probability that exactly 1 out of 4 will be defective, we make use of

Probability =  ^nC_3pq^3

Substitute 4 for n, 0.2 for p and 0.8 for q

Probability =  ^4C_3 * 0.2 * 0.8^3

Probability =  \frac{4!}{3!1!} * 0.2 * 0.8^3

Probability = 4 * 0.2 * 0.8^3

Probability = 0.4096

Solving (c): Probability that at least one is defective;

In probability, opposite probability sums to 1;

Hence;

<em>Probability that at least one is defective + Probability that at none is defective = 1</em>

Probability that none is defective is calculated as thus;

Probability =  q^n

Substitute 4 for n and 0.8 for q

Probability =  0.8^4

Probability = 0.4096

Substitute 0.4096 for Probability that at none is defective

Probability that at least one is defective + 0.4096= 1

Collect Like Terms

Probability = 1 - 0.4096

Probability = 0.5904

8 0
3 years ago
Gina is upgrading your computer with a new processor. She installed the processor into your motherboard and adds the cooling sys
tigry1 [53]

Answer:

The answer is option d.

8 0
3 years ago
Read 2 more answers
A coworker asks your opinion about how to minimize ActiveX attacks while she browses the Internet using Internet Explorer. The c
uysha [10]

Answer:

Security Tab is the correct answer.

Explanation:

The Security Tab will enable the users to authorize anyone to use that file or directory.Many clients deleted the security tab because After that nobody can alter the security privileges on the device.

  • With the help of the Security tab, we will minimize the ActiveX attacks on Internet Explorer. This option is available in the Internet Options of the dialog box.
  • Other options are incorrect because they are not related to a given scenario.
8 0
3 years ago
Other questions:
  • How Java provides protection through stack inspection approach ?
    7·1 answer
  • When transporting data from real-time applications, such as streaming audio and video, which field in the ipv4 header can be use
    14·1 answer
  • When naming a file you should use the _____________ instead of a space in a filename.
    6·1 answer
  • To access WordPad, Jill will click on Start, All Programs, Accessories, and WordPad. To access Notepad, Karl will click on Start
    5·1 answer
  • You need to access the registry on your windows 10 computer how do you do this
    9·1 answer
  • What are the advantages to using a linked implementation as opposed to an array implementation?
    8·1 answer
  • What are the uses of plotters​
    7·2 answers
  • A label control may be added to a form by double-clicking on the Label control icon in the ________ window.
    15·1 answer
  • Which of the following is a property of TCP?
    8·1 answer
  • What can macro mode on a camera be used for?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!