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
sammy [17]
3 years ago
5

24 POINTS!!! Why are Sequences, Selection, and Iteration building blocks of algorithms?

Computers and Technology
1 answer:
lesya692 [45]3 years ago
8 0

Answer:

An algorithm is a step by step process that describes how to solve a problem in a way that always gives a correct answer.

An algorithm is made up of three basic building blocks: sequencing, selection, and iteration.

Sequencing: An algorithm is a step-by-step process, and the order of those steps are crucial to ensuring the correctness of an algorithm.

Selection: Algorithms can use selection to determine a different set of steps to execute based on a Boolean expression.

Iteration: Algorithms often use repetition to execute steps a certain number of times or until a certain condition is met.

Explanation:

You might be interested in
Return a version of the given string, where for every star (*) in the string the star and the chars immediately to its left and
lana [24]

Answer:

Explanation:

The following code is written in Java and uses a for loop with a series of IF ELSE statements to check the next and previous characters in a string. Checking to make sure that there are no asterix. If so it adds that character to the String variable output. Which is returned to the user at the end of the method. Two test cases have been created and the output can be seen in the attached image below.

class Brainly {

   public static void main(String[] args) {

       System.out.println(starOut("sm*eilly"));

       System.out.println(starOut("ab**cd"));

   }

   public static String starOut(String str) {

       String output = "";

       for (int i = 0; i < str.length(); i++) {

           if ((i != 0) && (i != str.length()-1)) {

               if ((str.charAt(i-1) != '*') && (str.charAt(i+1) != '*') && (str.charAt(i) != '*')) {

                   output += str.charAt(i);

               }

           } else {

               if ((i == 0) && (str.charAt(i) != '*') && (str.charAt(i+1) != '*')) {

                   output += str.charAt(i);

               } else if ((i == str.length()-1) && (str.charAt(i) != '*') && (str.charAt(i-1) != '*')) {

                   output += str.charAt(i);

               }

           }

       }

       return output;

   }

}

4 0
3 years ago
PLEASE HELP! I'm offering brainliest!
Marina CMI [18]

Answer:

1. Undo  2. Font Type   3. Font Size  4. Bold Font 5. <em>Italics  </em>6. Word Color  7.  Document Margins

Explanation:

Did you know that all of these answers are how to format a document?

7 0
2 years ago
What is meant by the term text?
krek1111 [17]

Answer:

It's D

Explanation:

5 0
3 years ago
Read 2 more answers
What is the python print of (“5”+”7”)?
Firdavs [7]

Answer:

57

Explanation:

Since the 5 and the 7 don't represent integers instead they represent strings so it would come out as 57 hope I helped!

4 0
3 years ago
In this scenario, what is the importance of anti-virus software and other similar virus protection programs?
Svetradugi [14.3K]
To protect my computer form hacking and save my files
3 0
3 years ago
Other questions:
  • Websites using www showed up on the internet for the first time in -992
    9·1 answer
  • Given four values representing counts of quarters, dimes, nickels and pennies, output the total amount as dollars and cents. Out
    10·1 answer
  • Which of the following is an example of a direct payment subsidy?
    12·1 answer
  • How is a cell named in microsoft excel 2016
    10·1 answer
  • When Mark’s organization implemented an IS, they faced the lack of confidence in users. Which strategy can improve user confiden
    11·1 answer
  • What is the basic difference between a printer and a plotter?​
    12·1 answer
  • Eight what makes one character
    14·1 answer
  • Which type of document should Omar print?
    5·2 answers
  • Set of general format used to write program in any programming language?​
    10·1 answer
  • The files in James's computer were found spreading within the device without any human action. As an engineer, you were requeste
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!