Loops - Reading Assignment

  1. What is looping control flow allowing us to do? From the chapter:
    “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. Describe what “loops” do in your own words.
    Loops are a programming tool that allows a programmer to perform an operation until certain criteria or condition is met.

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

  4. What is indentation?
    Indentation - A formatting technique used by programmers, it does not affect how the program function it simple makes the program easier to read & understand.

1 Like
  1. We can run a piece of code multiple times. We can
    go back to some point in the program where we was
    before and repeat it with current program state.

  2. A loop is searching for dates in a special range or
    for special words to filter them out and present.

3.The difference between do loop and while loop is, a
do loop always executes its body at least once.
And it starts testing whether it should stop only after
that first execution.

  1. Indentation are space in front of statements.
    The reason for intentions inside blocks is to make
    them to stand out for better
2 Likes

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

Looping allowing us to run a particular code, in a way of control flow, multiple time.

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

In my understanding loops is a code which goes around and around in circles until the defined value is true.

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

Both while and do loop are similar only difference it " do" keyword starts testing after the first execution of the program whether the value is true, if not it will repeat over and over until the value is true.

4. What is indentation?

Indentation is adding space in code to make it structurally more aesthetic and easier to read. This structural enhancement proper identification of possible mistakes.

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 allow me to perform an operation again and again until a certain result is achieved, without having to do it manually each time.

  3. A do loop always executes its body at least once, and it starts testing whether it should stop only after that first execution.

  4. Indentations are a way for programmers to organize their blocks by using spaces between them.

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

is a way to run a piece of code multiple times.

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

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

A 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.

  1. What is indentation?

is the space between bloks to make it stand out.

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” is created for us to run a piece of code multiple times until certain criteria is met.
3, Main difference is that 'Do-loops" will always execute the code at least before it starts testing whether it should stop only after its first execution. “While” will evaluate the condition first before execution.
4, Indentation is the blank space created to let the code structure stand out.

2 Likes
  1. Looping control allows us to create and repeat the condition.
  2. My definition of “Loop” is a repeat a line of codes until the condition is false or returns a statement.
  3. While and do-loops runs until is reaches a value.
  4. Indention keeps the code organized and making it a lot easier.
2 Likes
  1. 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

  2. Describe what “loops” do in your own words.
    • The program reiterates a an action you want, until the condition for that action is no longer met. In this way you can perform a whole series of similar actions without having to write them all out individually

  3. What is the difference between while and do-loops?
    • a do loop always executes its body at least once, and it starts testing whether it should stop only after that first execution.

  4. What is indentation?
    • Moving your code to the right, to structure the code without affecting the code

2 Likes

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 helps us with work efficiency, because the main goal of loops is that you can run codes multiple times, so you don’t have to write all the codes again and again.
3.
The while loop keeps entering statement as long as the expression’s value gives “true” in Boolean.
Do loop always executes its body at least once, and then tests it if it should stop only after that first execution.
4.
In codes where new blocks are opened inside other blocks, using correct indentation you make the structure of the code stand out, to give more transparency to it.

3 Likes
  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 repeat a certain group of statements multiple times for as long as a certain condition expression is true.

  3. A do-loop has to run at least once, but a while-loop first checks whether a statement is true or false.

  4. Indentation is used to structure code to be more easily read and understood by human beings. This is important when we need to look over and edit our code.

2 Likes

1. What is looping control flow allowing us to do?
When we loop the control flow, we are able to get the same block executed over an over again. Usually this makes sense if a least one value of a binding changes for each iteration.

2. Describe what “loops” do in your own words.
Loops execute the code of a block as long as the boolean condition attached to this loop is evaluated as true. If the boolean condition is no longer met, the execution of the loop is finished and the work flow goes on.

3. What is the difference between while and do-loops?
While-loops check the condition before the block is executed. If the condition is false, the loop will be skipped. Do-loops check the condition at the end of the block, so the block attached to this loop is at least executed once until the end of the block (unless a break statement get executed before the end). After the execution of the block the boolean condition is evaluated. If it evaluates as true, the do-loop will be executed once again. If the condition is evaluated as false the loop is finished and the work flow goes on.

4. What is indentation?
Although indentation is not necessary to write working programs, it enhances the readability of the program code quite a lot. Due to the indentation blocks and structures of nested statements can be more easily identified by the human eye. This reduces the time to figure out what the purpose of this code is considerably. In the programming language Python programmers are actually forced to use proper indentation, because the parser uses the indentifiation to reconise blocks.

3 Likes

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. A loop is an instruction that repeats until a specified condition is reached.
3. While loop check condition before iteration of the loop. Do-while loop verifies the condition after the execution of the statements inside the loop.
4. Indentation is to make the structure of the code stand out. Yet

2 Likes

1- gives us a way to run a piece of code multiple times
2- 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.
3- a do loop always executes its body at least once, and it starts testing whether it should stop only after that first execution
4- to make the structure of the code stand out.

2 Likes
  1. Looping flow control allows us to Loop / repeat statements in a certain order until a predetermined resolution is achieved.
  2. Allows a task to be repeated over and over without having to input the same command multiple times.
  3. While loops check their parameters first, then execute. Do loops execute first, then check their parameters to see if they need to continue.
  4. Indentation is the spacing used to keep the structure of the program in order/ formation.
2 Likes
  1. allows us to jump pack to a point in the program we previously used with the current machine state
  2. a peice of code that runs over and over until it breaks or achieves its goal.
  3. while loops can run 0 time where a do loop runs at least 1 time
  4. simply a way of organizing code so humans can read it better
2 Likes
  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. Loop is when you program a piece of code to run multiple times.

  3. A ‘while loop’ keeps entering the statement as long as the expression produces a value that gives true in Boolean, where ‘do loop’ executes its statement at least once, and it starts testing whether it should stop only after the first execution.

  4. Indentation are spaces, line breaks and gaps to make the structure of the blocks of code to stand out and easier to read.

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.

Describe what “loops” do in your own words.

Loop do a specific task, again and again until we have checked all the parameters we wanted to check for.

What is the difference between while and do-loops?

a do loop always executes its body at least once, and it starts testing whether it should stop only after that first execution

What is indentation?

The role of 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 ‘loop’ a program to follow the same previous code, all while under certain criteria that will output an acceptable result and allow the program to proceed."

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

Loops tell a computer to do a task until a defined result is achieved.

  • What is the difference between while and do-loops?

‘While’ is a looping control flow mechanism that is defined by a limited value. The ‘do’ control tells the computer what it should do… Ex. While ‘this’ is happening, do ‘that’.

  • What is indentation?

Indentation is the act of spacing your code in order to keep the coding that you have been doing clean and orderly.

1 Like

1- Looping control flow allow us to run a piece of code multiple times. 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- repetition until a certain criteria is achieved.

3- They are both control structures and only differ in 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.

4- Indentation enables to make the structure of the code stand out. In the code where new blocks open inside other blocks, it can become hard to see where one block ends and another one begins. With proper indentation, the visual shape of a program corresponds to the shape of the blocks inside it. Improves readability.

1 Like
  1. What is looping control flow allowing us to do?
  • Allows for example: Parts of code to repeat a set of instructions until a desired condition has been reached. It allows versatility in the code.
  1. Describe what “loops” do in your own words.
  • Let parts of code execute over until a condition has been met.
  1. What is the difference between while and do-loops?
  • While operate a loops whilst a statement is true (until it returns false) - Boolean.
  • Do always operate at least once to discover the ‘state’ in order to know how to proceed.
  1. What is indentation?
  • Best practice for coding to enable easy deciphering of individual blocks and code structure. Correct formatting.
1 Like