Loops - Reading Assignment

1, It allows us to go back to some point in the programme where we were before
and repeat it with our current programme state.
2, A Loop is a way to run a piece of code multiple times by enabling
checking against a starting reference.
3, A (While Loop) will continue to repeat until its result is no longer true. A (Do Loop)
will execute its body at least once then test to see if it should stop.
4, Indentation are spaces in front of statements
to help make the structure of the code stand out. It is a visual aid with which to
see the code more coherently.

1 Like
  1. What is looping control flow allowing us to do?

Looping control flow allows us to return to a certain part of the program and repeat it within that same program state.

  1. Describe what “loops” do in your own words.

Loops allow the programmer to repeat functions as many times as required in order to achieve a result. They make a programmer’s job easier by shortening potentially lengthy code.

  1. What is the difference between while and do-loops?

The while loop will check the Boolean first before executing it; an unmet condition will result in no output.
The do loop will not check the Boolean condition before preceding to execute it one time.

  1. What is indentation?

Indentation is what a programmer uses to clearly arrange long and complex code. Indenting – starting the code slightly forward or back on the program line - different sections in a program can give it a formality; making it easier to read for the user as well as anyone else that is looking at it.

1 Like
  1. Allows the program to go back to the start of a conditional execution with the current program state saved in the memory

  2. Permits programmer to perform certain tasks until values are accomplished thus executing a new part/branch of the program

  3. What is the difference between while and do-loops?
    A while loop will run indefinitely until the condition is false. The do part always runs once whether the condition is true or false.

  4. It is a tab or several spaces in in front of statements. They don’t affect the program but allows people to read easily to what’s going on.

1 Like
  1. What is looping control flow allowing us to do?
    It allows us to repeat certain tasks

  2. Describe what “loops” do in your own words.
    Loops can repeat tasks or better a program over and over without you having to do each step on its own.

  3. What is the difference between while and do-loops?
    Do loops executes at least once before deciding if it needs to execute again. If a while loop has a certain problem it even wont execute a single time.

  4. What is indentation?
    Makes it easier to read the code and see different parts of code. It is not needed by the program but a good idea for us humans to see different section, segments of the written code.

1 Like
  1. What is looping control flow allowing us to do?
    The looping control flow allows you to go back to a certain point in the program and run a piece of code again with the current program state, until a certain condition is met and in the consequence leaving the loop.

  2. Describe what “loops” do in your own words.
    Loops run a piece of code until a given condition is met. Loops do differ in the way at what time they check the condition to be met.

  3. What is the difference between while and do-loops?
    While-Loops require the condition to be met to enter the loop whereas the do-Loop executes at least once and checks the condition at the end.

  4. What is indentation?
    Is added space on certain lines of code. It is not necessary to run the code but largely increases readability and provides structure to the code making it much easier to follow and understand.

1 Like
  1. What is looping control flow allowing us to do?

Looping control flow allows us to go back to some point in a program where we were before and repeat it with our current program state.

  1. Describe what “loops” do in your own words.

Loops repeat the same function indicated by the code an indefinite number of times until a specified condition is met.

  1. What is the difference between while and do-loops?

The while loop continues running until a condition is met. A do loop continues running until it gets the desired response.

  1. What is indentation?

Indentation is the space placed before statements to make the structure of the code more obvious.

1 Like
  • What is looping control flow allowing us to do?
    Looping control flow allows us to execute a code until a certain point then go back to a precedent moment in the program and re-execute this last part of code until the condition for the end of the loop is met.

  • Describe what “loops” do in your own words.
    Loops repeat a piece of code many times;

  • What is the difference between while and do-loops?
    While and do loops are really similar, if not for the fact that do loops execute the body of the operation inside its parenthesis at least one time.

  • What is indentation?
    The indentation is the style we use to make stand out the structure of our code to make it look more readable, is not mandatory, just suggested for clarity

1 Like
  1. Looping control flow allows us to go back to some point in the program where we were before and repeat it with our current program state.
  2. Loops allows us to repeat a sequence of a program until an end condition is met.
  3. A do loop always executes its body at leat once.
  4. Indentation means the way you arrange the program for readability.
1 Like
  1. Looping control flow allows us to repeat execution of some code as many times as we need to.
  2. Thanks to the loops programs can be shorter. Instead of writing something 100 times we can use loop and make that same effect. Live is much easier thanks to the loops :slight_smile: .
  3. The Do loop executes its code before testing condition so it execute at least one time. The While loop starts with condition testing so there is possibility that it won’t be executed.
  4. Indentations makes a program easier to understand for humans when they look at it. Just like paragraphs in the newspaper.
1 Like
  1. Allows us to repeat code without having to write it several times.
  2. Loops repeat code, until a condition is met.
  3. do loops will execute at least once. while loops don’t have that guarantee.
  4. Indentation is to leave a space of 4 space bars or a tab, when there is a section of code inside another one.
1 Like

It allows us to go back to some point in the program where
we were before and repeat it with our current program state.
2.
It keeps repeating a function until a certain boolean requirement/condition is filled(false), just then, it breaks from the loop.
3.
In the While-Loop the loop keeps entering that statement as long as the expression produces a value that gives true when converted to Boolean. In other words, it will check first and run later after true confirmation.
In a do-loop, its body always executes at least once, and it starts testing whether it should stop only after that first execution. In other words, it will run first and check later if it keeps repeating it.
4.
It is the structuring of your written code, the role of the indentation inside blocks is to make the structure of the code stand out.

1 Like

What is looping control flow allowing us to do?
Looping control flow allows us to go back to some point in the program where
we were before and repeat it with our current program state until a certain condition exists or ceases to exist

Describe what “loops” do in your own words.
A loop is a means in which a section of code can be executed multiple times usually with one or more of the values used in the code changing in order to give a slightly different result. The number of times it is executed is controlled by a boolean expression.

What is the difference between while and do-loops?
A do loop will always execute as least once. A while loop might not execute at all.

What is indentation?
It is the process of structuring code to be visually informative to how the programmer has written it and its execution flow. The compiler will ignore it, it is to help humans understand the code quicker.

1 Like

Javascript keywords “if”, “else”, & “switch” allow for conditional operations outside of the base expression.

Loops allow a program to run over and over again until they satisfy a desired target given in the body of statements.

A do loop will always complete it’s loop at least once, whereas a while loop will run multiple loops as long as the Boolean value is true.

Indentation allows for better structure and flow from one statement to another in a program.

1 Like
  1. A looping control flow allows us to go back to some point in the program where we were before and repeat it with our current program state.

  2. “Loops” are computations which returns from the end to the beginning a number of times.

  3. While loop creates a loop. The word while is followed by an expression in parentheses and then a statement, much like if. The loop keeps entering that statement as long as the expression produces a value that gives true when converted to Boolean.
    Do loop is a control structure similar to a while loop. It differs only on one point: a do loop always executes its body at least once, and it starts testing whether it should stop only after that first execution. To reflect this, the test appears after the body of the loop.

  4. Indentation is the way text is distributed inside blocks to make the structure of the code stand out.

1 Like
  1. The looping control flow allows the program to go back and keep solving the statement until the condition is met.
  2. Loops repeat actions until the conditions are met.
  3. The while keeps executing the program until it reaches a goal, the Do checks if it has to stop executing after the first time.
  4. Indentation has the main goal of making the code stand out from the rest
1 Like
  1. Looping allows us to write a program to repeat itself by testing the program state.
  2. Looping is a way to iterate through a dataset like an array of items, or count based on the binding values and repeats until the condition is not met anymore.
  3. While and Do loops are similar with only one differences, Do loop always execute the body at least once and start testing until the condition is met.
  4. Indentation is to make the codes more readable and easily navigate.
1 Like
  1. Loop control allows us to interrupt the normal flow of the program. They direct the program control to a specific location in the code and loop it.
  2. Loops allow a line of code to repeat itself until a value is met.
  3. A while loop executes as long as the specified condition evaluates to true. A Do loop will always execute once, even if the condition is never true.
  4. Indentation is used to make code easier to read on the page by you or someone else. They don’t have to be used as it does not affect how the problem works. Just easier on the eye really.
1 Like

Answer:

  1. The looping control flow allows us to write a program that repeats the same action until the condition for ending that loop is met. It allows us to execute the same code more than ones.
  2. “Loops” are pieces of code that send us back to the beginning of that code while changing a value or state. In some cases, the “loop” continues without a change of state or value until some other condition is satisfied.
  3. “While” loops first test whether it should stop before executing the body of the loop. Do loops execute the body at least once before starting to test the condition to exit the loop?
  4. Indentation is a style of writing code in a way that is easier to understand for programmers. It gives visual structure to blocks of code. You can compare it to paragraphs and chapters in storytelling. Statements can be nested inside of other statements, and programmers use indentation to visually separate one from the other.
1 Like
  1. What is looping control flow allowing us to do?: It allows us to go back to some point in the program where we were before and repeat it with our current program state

  2. Describe what “loops” do in your own words.: They are a simplified and conditional way to invoke repetition of similar program statements

  3. What is the difference between while and do-loops?: do-while loops invoke their internal statements at least one time, regardless of the execution condition

  4. What is indentation?: Is a way to visually represent the program structure/flow by spatially organizing the code

1 Like
  1. It allows us to repeat the execution of a line of code continuously until a desired result.

  2. Repeating action

  3. A do loops always executes it’s body at least once

  4. Where you make the structure of the code stand out by adding spaces

1 Like