Loops - Reading Assignment


#323
  1. Looping allows to do repetitive tasks.
  2. A loop in javascript helps us to do a task again and again until a particular condition is met.
  3. In a while loop condition is checked first and then the code is executed but in do loop the condition is checked is checked after the execution of code.
  4. Indentation is giving some space in starting of a line of code so that it becomes easy to read and manage.

#324
  1. What is looping control flow allowing us to do?
    It allows us to return to a point in the program where we were before

  2. Describe what “loops” do in your own words.
    Loops are functions that repeat a set number of times until a chosen requirement is met.

  3. What is the difference between while and do-loops?
    While loops will only run if the chosen boolean is true.

Do loops will always run once and then check to see if they should run again.

  1. What is indentation?
    Adding a number of spaces or a tab to your code to make it more readable for humans.

#325

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. Usually it is combined with a variable that counts.

Describe what "loops" do in your own words.

A loop allows us to do something over and over again according to some criteria. If i wanted to walk around the park again and again until I got tired, I could think about this as a loop. Its repeating a process until the condition is false (or you come across the break statement)

What is the difference between while and do-loops?

While loops first check if the condition is true before doing anything. (ask first and then do something)

Do loops will do its thing and then check on the condtion, if the condtion is still true it will do its thing again. (do something first and then ask later if its ok to carry on)

What is indentation?

This is just a way of making the code more readable. You don’t have to indent anything or use different lines…you could just write 1 big long line of code to do everything, but it would be cumbersome to read and follow. It makes the structure of the code stand out


#326
  1. What is looping control flow allowing us to do? Looping control flow allows us to check if a condition holds true and continue looping until it is false. At that point, the program breaks out of the loop and continues executing other statements.

  2. Describe what “loops” do in your own words. Loops interrupt the flow of statements to introduce a boolean condition that, if it is true, will perform an action or actions on a value or values and will continue doing so until the boolean condition becomes false. At that point the program flow breaks out of the loop and continues executing the next statement.

  3. What is the difference between while and do-loops?
    Do-loops will execute the body of the loop at least once before testing to see if it should repeat. A While loop will test for a condition first to determine if a loop should begin.

  4. What is indentation? Indentation is when you place spaces in front of statements. They are used to visually display blocks of code and make it easier for anyone reading the program to understand the program.


#327
  1. What is looping control flow allowing us to do?
    Loop control flow basically allow us to determine how many times the loop to run either by a certain number or by condition being met.
  2. Describe what “loops” do in your own words.
    It allow the code to be run multiple times.
  3. What is the difference between while and do-loops?
    do-loops will always run the code at least once and while loop is at least 0.
  4. What is indentation?
    The spacing for the code. Usually is to format for more readability.

#328
  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.
    They will execute a function while a value is true.
  3. What is the difference between while and do-loops?
    A do loop is a control structure similar to a while loop. It differs only in one point : a do loop always executes its body at least once, and it starts testing wheteher it should stop only after that first execution.
  4. What is indentation?
    The role of indentation is to make the structure of the code stand out. With proper indentation, the visual shape of a program corresponds to the shape of the blocks inside it.

#329

1. What is looping control flow allowing us to do?
To run a piece of code multiple times. This type of control flow is called a loop. Loops allow us to automate repetitive tasks.

2.Describe what “loops” do in your own words.
If you would like to run the same line of code 100 times, it means you can program the loop to do this, rather than copying and pasting the same line of code 100 times, allowing us to save time and also make the code more concise and presentable.

3.What is the difference between while and do-loops?
While will execute as long as the condition that follows the while command in parentheses is true. If it is never true the code will not execute at all. Do-while loops on the other hand will execute the code at least once in any event.

4.What is indentation?
The role of indentation is to make the structure of the code clear and presented well so that it’s easier to understand. Different people’s tastes differ, for example some like to use two spaces, others like to use tab characters. Some programs, such as Atom, will automatically indent the code for you.


#330

Looping control flow allows us to run a code over and over again. It allows us to go to where we were before in the program state and repeat it with our current program state. The word ‘ while’ will start a loop and if the Boolean value is true then the program state will keep entering its loop. A ‘do’ loop is similar to a ‘while’ loop only other than that it always completes its first loop at least once and will start testing to end that loop after the first completion. I believe it was the ability to loop in blockchain that separates Ethereum from Bitcoin in its functions. Indenting the code on the screen is simply making it easier for the reader to see the program. The computer itself does not need the spaces or the visual clarity. Proper indentation means that the visual shape of the program is linked to the shapes of the blocks inside it.


#331
  1. It allows us to run a statement once a certain condition is met. That condition is usually derived from itself, through a defined relationship and an initial value.

  2. Loops repeatedly run a piece of code until a certain condition is met, that interrupts the loop. Then, the program executes the statement that follows the loop.

  3. While loops run and check for a condition, then execute the next statement. Do loops execute an initial statement, then proceed with a regular while loop.

  4. It is a good practice in coding to add indentation to your program, in order to make its structure more clear and visible. Usually, indentation is added whenever a segment of code is nested within another segment, and indentation can take the form of 1,2 or more spaces, depending on the coder’s personal preference.


#332
  1. Looping control flow allows us to repeat a task without programming each step.
  2. A repetition of a task until the values are met.
  3. While loops execute the program until a condition is reached, do loops execute the program at least once.
  4. Indentation is to structure your code to be more readable & is also a matter of reference.

#333

1. What is looping control flow allowing us to do?
Reduce redundant code by using the “while” function and repeating a statement until a certain condition is met, this is very important when building a fast and light application, it allows programmers to harness the power of computers.

2. Describe what “loops” do in your own words.
Loops are functions which repeat a set of statements that can be nested within other loops and functions until a certain condition is met.

3. What is the difference between while and do-loops?
While loops only execute if a certain condition is met while do-loops will execute at least once until the condition is invoked.

4. What is indentation?
Indentation is a reference to the syntax structure of code that allows a programmer to see a logical layout of the code that’s visually easy to identify from the surrounding code.


#334
  1. What is looping control flow allowing us to do?
    It allows us to repeat the same function over and over again. It allows progression while bringing us back to an earlier step in the program each time.
  2. Describe what “loops” do in your own words.
    Loops allow a program to repeat functions in a much more efficient manner than having to code each one of the progressive functions individually.
  3. What is the difference between while and do-loops?
    The only difference is that a do loop must execute itself at least once before it can determine if the process is complete or not.
  4. What is indentation?
    Indentation is only useful to humans because it is used to make portions of the code stand out from the rest so that it can easily be identified.

#335
  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.
    it allows us to run a line of code repeatedly without writing the code multiple times for doing the same thing.

  3. What is the difference between while and do-loops?
    do 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

  4. What is indentation?
    proper formatting of the code by adding spaces so that it looks neat and readable.


#336
  1. What is looping control flow allowing us to do?
    It is a flow that allows you to make a loop back to a previous part of the code, allowing you to repeat a section.

  2. Describe what “loops” do in your own words.
    Loops keep on repeating specific sections of a programme until certain conditions are met

  3. What is the difference between while and do-loops?
    Do loops always execute at least once

  4. What is indentation?
    It’s adding space or other visual methods to make the code easier viewable for humans


#337

1 A looping control flow alows us to go back in the program and excecute the same code with different values.
2 Loops run iterations of code until a criteria is filled. usually the loop statement stops when it returns false.
3 A do loop will always excecute the first loop
4 Identations allow us to read the code. Without intendetions the code would be in one line and unreadable.


#338
  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 run a piece of code multiple times with a few lines of code. There’s usually a counter in the condition of the loop that executes if true. Otherwise, the loop ends.
  3. A while loop executes an expression each time it produces a value that gives true. A do loop also has a while loop piece, but the difference is that the do loop executes its body at least once, and then it starts testing whether it should stop after the first execution.
  4. Indentation visually sets up the structure of the code where it is easily readable. Code can be created without indentation, as you could write a program on a single line. This scenario would make a programmer’s life much harder to understand code.

#339

* What is looping control flow allowing us to do?

It allows you to execute something multiple times without having to manually program every step. For example, executing a certain mathematical function a certain number of times.


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

In my opinion, a loop runs a statement/function in a circular fashion multiple times (or not at all) until a predetermined condition is reached.


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

A while loop continues to execute when a boolean value is true. This may cause the loop to run 1 time, 100 times, and 1,000,000 times. It is also possible for it to not run a single time. That is the key difference. A do loop will execute at least once before it tests the boolean value to determine whether it continues or not.


  • What is indentation?

This is simply a stylistic choice, but an important one. Indentation (and line breaks) make it easier for the human program to visualize and decipher the code. It would be more difficult to read/understand code that didn’t follow these coding stylistic norms.








#340
  1. looping control flow allows one to go back to a point in the program where they were before and repeat it with the current program state.
  2. The typical control flow follows the top-bottom control flow. Looping allows one to set a marker persay that allows for an instruction to be met that will allow you to come back to the original program state of live code.
  3. while loops keep entering the statement as long as the expression produces a value that gives true when converted to Boolean. a do loop is the same thing but executes itself at least once, then tests itself on whether it should continue after this first execution
  4. Indentation is just a neat convention in which programmers try to stay organized by using indentation where necessary.

#341
  1. What is looping control flow allowing us to do? It allow us to execute more ripetitive instructions without the need of write a line of code for each one.

  2. Describe what “loops” do in your own words. Loops create a reiteration of the execution of a sequence of code.

  3. What is the difference between while and do-loops? in a do loop the first iteration is always executed, in a while loop also the execution of the first itertion is conditionated.

  4. What is indentation? The indentation is a good practice in writing code that highlights the level of nesting of single instruction by increasing or decreasing the left margin of the relative code line.


#342

Looping control flow allows us to design conditional code that interrupts the logical top down flow and executes Code based on values in the program.