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
Kruka [31]
3 years ago
9

e do loop differs from the while loop in that a. the while loop will always execute the body of the loop at least once b. the do

loop will always execute the body of the loop at least once c. the do loop will continue to loop while the condition in its while statement is false and the while loop will continue to loop while the condition in its while statement is true d. the while loop will continue to loop while the condition in its while statement is false and the do loop will continue to loop while the condition in its while statement is true e. None of these; there is no difference between the two types of loops
Computers and Technology
1 answer:
cluponka [151]3 years ago
6 0

Answer:

b. the do loop will always execute the body of the loop at least once

Explanation:

The do loop will always execute the body of the loop at least once becuase it is an exit loop, that means the condition is always checked at the end, where as while loop execute hte body of the loop zero times as it is an entry loop and the condition will be checked prior to the execution of body of the loop.

do loop structure is as shown below

do{

}while()

So it executes the block atleast once and then checks the condition

Hence, the do loop will always execute the body of the loop at least once.

You might be interested in
Which navigation icon would you click on to add a new Contact?
Sauron [17]
The answer would be people
3 0
3 years ago
Read 2 more answers
can anyone yell how to save the python file in folder i am saving it but whenever I'm trying to open its not open​
NISA [10]

Saving a python file implies that one wants to have a physical file of the program on a storage device.

To save a python program, the following step must be followed

  1. Select Save As
  2. Navigate to the directory where you want to save the file
  3. Enter the file name
  4. Click save

Note that python files are saved in the .py extension

Read more about python programs at:

brainly.com/question/16397886

4 0
3 years ago
Read 2 more answers
Progressive places its messages on local radio stations and in the yellow pages of the phone book. These communications are dire
Alexandra [31]

Answer: Receiver

Explanation:  

The receiver basically is used in the communication channel where the person decode its output and message in the form of useful data or information.

The main function of the receiver is to provide the path between the transmitter as an output and receiver as an input. The receiver basically process the received signal for recovering the proper message signal. It basically receive the input signal and covert it into useful data.

7 0
3 years ago
How are headers and footers are useful in presentation​
Svetradugi [14.3K]

Answer:

Explanation:

PowerPoint is a software that allows user to create headers as well as footers which are information usually appears at the top of the slides and the information that appears at the bottom of all slides. Headers and footers are useful when making presentation in these ways:

✓ Both provide quick information about one's document/ data clearly in a predictable format. The information that is provided by the Header and footers typically consist of ;

©name of the presenters,

©the presentation title

©slide number

©date and others.

✓ They help in setting out different parts of the document.

✓Since the Headers and footers can appear on every slide, corporate confidentiality as well as copyright information can be added to footer area to discourages those that can steal ones secrete.

7 0
3 years ago
Dr. Watson has been kidnaped! Sherlock Holmes was contacted by the kidnapper for ransom. Moments later he received a message fro
adelina 88 [10]

Answer:

please mark me brainlist

Explanation:

This algorithm works for n number of strings in python3

Input:

83217

8213897

683147

Output:

837

from itertools import product

import pdb

import numpy as np

def neigh(index):

N = len(index)

for ri in product((0, -1), repeat=N):

if not all(i == 0 for i in ri):

yield tuple(i + i_rel for i, i_rel in zip(index, ri))

def longestCommonSubSequenceOfN(sqs):

numberOfSequences = len(sqs); # to know number of sequences

lengths = np.array([len(sequence) for sequence in sqs]); # to know length of each sequences placed in # array

incrLengths = lengths + 1; # here we are taking no .of sequences +1

lengths = tuple(lengths); # making lengths into tuple to make it mutable

inverseDistances = np.zeros(incrLengths);

ranges = [tuple(range(1, length+1)) for length in lengths[::-1]]; # finding ranges from 1 to each lengths

for tupleIndex in product(*ranges):

tupleIndex = tupleIndex[::-1];

neighborIndexes = list(neigh(tupleIndex)); # finding neighbours for each tupled index value and # store them in list

operationsWithMisMatch = np.array([]); # creating array which are miss matched

 

for neighborIndex in neighborIndexes:

operationsWithMisMatch = np.append(operationsWithMisMatch, inverseDistances[neighborIndex]);

#appending newly created array with operations miss match and inverseDistances

operationsWithMatch = np.copy(operationsWithMisMatch);

# copying newly generated missmatch indexs

operationsWithMatch[-1] = operationsWithMatch[-1] + 1;

# incrementing last indexed value

chars = [sqs[i][neighborIndexes[-1][i]] for i in range(numberOfSequences)];

# finding a string(chars) with neighbour indexes and checking with other sequences

if(all(elem == chars[0] for elem in chars)):

inverseDistances[tupleIndex] = max(operationsWithMatch);

else:

inverseDistances[tupleIndex] = max(operationsWithMisMatch);

 

subString = ""; # resulted string

mainTupleIndex = lengths; # copying lengths list to mainTupleIndex

while(all(ind > 0 for ind in mainTupleIndex)):

neighborsIndexes = list(neigh(mainTupleIndex));

#generating neighbour indexes with main tuple index in form of list

anyOperation = False;

for tupleIndex in neighborsIndexes:

current = inverseDistances[mainTupleIndex];

if(current == inverseDistances[tupleIndex]): # comparing indexes in main tuple index and inverse #distance tuple index

mainTupleIndex = tupleIndex;

anyOperation = True;

break;

if(not anyOperation): # if anyoperation is False then we are generating sunString

subString += str(sqs[0][mainTupleIndex[0] - 1]);

mainTupleIndex = neighborsIndexes[-1];

return subString[::-1]; # reversing resulted string

sequences = ["83217", "8213897", "683147"]

print(longestCommonSubSequenceOfN(sequences)); #837

8 0
3 years ago
Other questions:
  • Which of the following is a type of monitor port?
    10·1 answer
  • What is the most common threat on the internet? auction fraud illegal software computer viruses hackers?
    14·1 answer
  • What does the "e" in eSATA stand for?
    13·2 answers
  • What is the error and why is there an error in the code below?
    14·1 answer
  • Assume that we are using 0-1 integer programming model to solve a capital budgeting problem and xj = 1 if project j is selected
    6·2 answers
  • Which is a good plan for backing up data?
    6·1 answer
  • Which bus slot provides highest video performance​
    13·1 answer
  • What internet access technology currently uses a technology called 4G?
    13·1 answer
  • How do open online courses help with independent learning
    6·2 answers
  • To read cheques, banks use​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!