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
DiKsa [7]
3 years ago
14

An array of strings , names , has been declared and initialized . write the statements needed to determine whether any of the th

e array elements are null or refer to the empty string . set the variable hasempty to true if any elements are null or empty-- otherwise set it to false .
Computers and Technology
1 answer:
OLEGan [10]3 years ago
3 0
#Python

hasempty = False
for name in names:
   if ( not name ):
      hasempty = True
      break  # speed things up
You might be interested in
Determine the number of character comparisons made by the brute-force algorithm in searching for the pattern GANDHI in the text
leonid [27]

Answer:

Total number of character comparison = 43

Explanation:

Using the Brute force algorithm

The string of n characters is known as text, and the string of m characters is known as the pattern.

From the given information:

The text (n)=THERE_IS_MORE_TO_LIFE_THAN_INCREASING_ITS_SPEED

The pattern (m) = GANDHI

The total no of characters that we have in the text = 47

The total number of characters in pattern = 6

For a brute force algorithm;

Since; the first character of the pattern does not exist in the text, then the number of trials made can be attempted can be expressed as = n – m + 1

= 47 – 6 + 1

= 47 – 5

= 42

Thus; the algorithm will attempt the trial 42 times.

Now, for loop in the algorithm to run 42 times, the G in the pattern will have to align against the for T in the text, and in the last case, it will be aligned against the last space.

On each attempted trial, the algorithm will make one unsuccessful comparison.

However, at the trial at which the G in the pattern Is aligned with the G in the text, there will be two successful comparisons.

Hence, we can calculate the total number of character comparison as follows:

Total number of character comparison = \mathbf{\bigg ( ( 42 -  (no. \ of \  failed \ comparison) ) \times 1 + (1 \times ( Two \ successful \  comparisons) ) \bigg ) }

Total number of character comparison = ( (( 42 – 1) × 1 ) + ( 1 × 2) )

Total number of character comparison = 41 + 2

Total number of character comparison = 43

3 0
3 years ago
You work for the Contoso Corporation. You have a server that acts as a file server for clients. You must make sure that the serv
Anika [276]
Get a dedicated server with 6-10gb RAM, which might be able to run a lot, while staying up with no lag.
6 0
3 years ago
What did Peter and Rosemary do for a living?<br>​
marta [7]

Answer:

Peter and Rosemary Grant are distinguished for their remarkable long-term studies demonstrating evolution in action in Galápagos finches. They have demonstrated how very rapid changes in body and beak size in response to changes in the food supply are driven by natural selection.

Explanation:

please

6 0
3 years ago
What does this translate to?: 01001001 01110011 00100000 01100010 01110010 01100001 01101001 01101110 01101100 01111001 00100000
Anastasy [175]
"Is Brainly down?" would be the text translation
7 0
3 years ago
Which of the following are true about the PUSH instruction?
kkurt [141]

Answer:

Option A.

Explanation:

Only option A satisfies the definition of push statements. So it is only the correct option.

7 0
3 years ago
Other questions:
  • Match each logical function with its description. AND COUNTIF SUMIF IF tests for a certain condition and returns one of two valu
    7·1 answer
  • Jennifer frequently uses a few programs on her laptop. Where will she find all the frequently used program icons in her computer
    13·1 answer
  • Who do u play as in sister location
    14·2 answers
  • End users have complained that when they click a link on your company's Website, the wrong client loads. You review the page wit
    11·1 answer
  • Consider the following method, inCommon, which takes two Integer ArrayList parameters. The method returns true if the same integ
    15·1 answer
  • What is star topology
    15·2 answers
  • Stroke weight - ____ of the line around a shape or size of the point
    8·1 answer
  • What describes Accenture's approach to automation?
    9·2 answers
  • A good algorithm should have which three components?
    6·1 answer
  • Bad Directions You are driving to your friend’s house and are using your smartphone for directions. While approaching your desti
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!