Loops - Reading Assignment

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.
Describe what “loops” do in your own words.
it is a continuous point which we can execute and refer back to.
What is the difference between while and do-loops?
A do loop always executes its body atleast once, and it starts testing to stop only after that first execution.
What is indentation?
It is indenting so you know where the next block is.

  1. Perform an operation some number of times or until a condition is met.
  2. Repeat some block of code.
  3. While is evaluated prior to executing the looping block, do condition is evaluated after.
  4. Placing tabs or spaces in front of lines of code to express more readable hierarchical structure.

1. What is looping control flow allowing us to do?
Go back to a certain point in the program and repeat it at the current program state.

2. Describe what “loops” do in your own words.
Loops allow you to run a block of code over and over as long as the value given is true.

3. What is the difference between while and do-loops?
The only different is that a do loop will at least execute the loop once and starts testing
after the first execution. A while loop checks the state prior to executing for the first time.

4. What is indentation?
Indentation is just a way to have clean looking code. While it’s not necessary for the program to
run properly, if used, it allows you to visually separate elements of code.

  1. Looping allows us to do repeat code that otherwise may take various repetitive lines of code.
  2. Loops allows programmer to save time by automating the repetition of a command.
  3. The while and do loop are very similar. The only difference is that do loop executes the body code at least once. While loop checks condition first before executing the body.
  4. Indentation allows the code structure to be clear. It’s not necessary but it helps the programmer and other people viewing the code.

What is looping control flow allowing us to do?
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.
epeat a line of code until the condition is false
What is the difference between while and do-loops?
The do-loop always runs once whether the condition is true or false
What is indentation?
The role of this indentation inside blocks is to make the structure of the
code stand out

  1. What is looping control flow allowing us to do?
    It allows revisiting a program at an earlier and
    already executed point where it can then re-execute.
  2. Describe what “loops” do in your own words.
    They can execute code over and over again.
  3. What is the difference between while and do-loops?
    A ‘Do’ loop always executes its body at least once. A
    while loop could stop after a false boolean value within
    the expression and not even execute the statement at all.
  4. What is indentation?
    It is the visual aspect of structuring the lines of
    code to make the structure of the code stand out.

Loops - Reading Assignment

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. In layman's terms, it allows us to execute the same piece of code over and over with different parameters. Loops must have a break condition - a condition that breaks the loop - or else it will keep going on forever.

2. Describe what “loops” do in your own words.
See above layman's terms answer :)

3. What is the difference between while and do-loops?
While loops may never iterate once if the condition is not met. Do loops iterate at least once because the condition is after the first iteration.

4. What is indentation?
Indentation is to make the written code more readable. Just like Ivan said during the html part, you can write the whole webpage on one long line of code...but it would be really hard to decipher or make changes. If you indent properly and consistently, you can easily see the structure of the written code and find things (functions, loops, etc...) more easily.

  1. What is looping control flow allowing us to do?
    Repeat logic/code in a controlled manner.
  2. Describe what “loops” do in your own words.
    Rerun blocks of code until/as long as conditions a programmer defines exist.
  3. What is the difference between while and do-loops?
    Do loops execute at least 1 time
  4. What is indentation?
    Formatting/spaces for code readability

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.
It makes possible to repeat statements than are needed to execute a necessary task with less effort.
3. What is the difference between while and do-loops?
do-loops blocks are accessed at least one time, while loops may be not.
4. What is indentation?
It is the way to organize the statements in blocks using spaces, in order to have a more readable code.

  1. It allowes us to do loop the code(go back to some part of the code) so we won’t hardcode(re-write or copy and paste).
  2. Loops are like the word it selfs loops a series of instructions to be executed.
  3. While loops executes while some value is true or false but do loops finishes after doing what it needs to done.
  4. Indentation is making code more readable by giving spaces or tabs.

What is looping control flow allowing us to do?
allows the actual looping by repeating the value until the limit is met.

Describe what “loops” do in your own words.
it repeats certain commands until satisfaction.

What is the difference between while and do-loops?
do loops forces a response from the user. Else, it maintains prompting.

What is indentation?
it allows better structure for code to be understood and audited.

1. What is looping control flow allowing us to do?
Allow 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.
In a program, the loop statement allow execute a piece of code many times. Every loop statement had a conditional expression that verify whether the loop will continue or not.

3. What is the difference between while and do-loops?
Basically, where the conditional expression will be. The ‘while’ statement are in the begin and the ‘do-loops’ statement are in the end.

4. What is indentation?
Is a pattern that recomend insert same amout of space in each new block of code. The code indented will be more easy to be read for another programer.

  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.
    A loop sets up an initial condition, a test expression to evaluate whether to stay in the loop or to exit it, and an increment function that is implemented each time through the loop so it can be evaluated by the test expression. The body of the loop consists of a set of statements that are executed each time the program goes through the loop.

  3. What is the difference between while and do-loops?
    A while loop may execute its body of statements 0 or more times. A do loop always executes its body of statements at least one time. This is because the test expression in the while loop is evaluated before the body of statements is executed but the test expression in the do loop is evaluated after the body of statements is executed.

  4. What is indentation?
    Indentation refers to adding spaces in front of statements. This is particularly done for statements that a re part of larger structures such as conditional statements or loops. The purpose is to enhance the clarity and readability of the code.

  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’s a way to run a piece of code multiple times.

  3. What is the difference between while and do-loops? Do-loops differ from while loop only on one point: a do loop always executes its body at least once, and it starts testing whether it should stop only after the first execution.

  4. What is indentation? The role of indentation inside blocks is to make the structure of the code stand out. In code where new blocks are opened inside other blocks, it can become hard to see where one block ends and another begins. With proper indentation, the visual shape of a program corresponds to the shape of the block inside it.

–Looping control flow allows us to go back to a previous point in the program and repeat it with out current program state.
–Loops allow a programmer to repeat coded tasks until specific benchmarks are met.
–A While Loop will only execute if specific criteria are met. A Do Loop always executes at least once & starts testing whether it should stop only after the first execution.
_________ --This is Indentation.

  1. run a piece of code multiple times
  2. as long as a condition exists, execute a series of statements
  3. while loops have the condition at the beginning and do loops it’s at the end
  4. blanks preceding a line of code used to make it more readable

What is looping control flow allowing us to do?
Looping control flow allows us to automatically scale a command that is too burdensome to manually type in.

Describe what “loops” do in your own words.
Loops instruct programs to run a piece of code multiple times automatically until an often pre-defined value has been met.

What is the difference between while and do-loops?
While loops keep looping until a certain value is met, and do-loops essentially do the same, but while while loops don’t necessarily have to even run once (because the value is already fulfilled/reached) do-loops require to be run once at a minimum.

What is indentation?
Indentation is the act of indenting lines of code according to their hierarchical representation within expressions, blocks, elements, you name it. In order to keep code under control, it is important that indentation and spacing is done consistently and symmetrically, so as to easily enable navigation of the various building blocks of the program.

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

  2. Loops allow you to efficiently program a specific repetitive action with minimal code

  3. A do-loop always executes is body at least once and it starts testing if it should stop only after it’s first execution

  4. The role of indentation inside of blocks is to make the structure of the code standout
    -Basically keeps everything organized and tidy for an easier way to visually present and inspect the code

  1. Looping control allows us to return to some stage of the program and repeat it with present program condition.
  2. The loops allow us to run piece of the code multiple times if needed, usually until the condition statement remains ‘true’.
  3. The ‘do’ loop always executes at least once, then it starts testing if it should stop of continue. If the condition statement comes as false for ‘while’ loop for first time it won’t run at all.
  4. Indentation is adding spaces in front of the statements that are part of larger statement. It is not necessary, computer would understand the code anyway, but it makes the structure of the code clearly seen and stand out.
  1. Looping control flow allows us get a program to repeat an action.
  2. Loops bring you back to the same action again if a certain condition is met. This way, you can write a program in shorthand rather than repeating line after line of similar programming text.
  3. Unlike a while loop, a do loop only tests whether it should do it after it has done it once.
  4. Indentation is setting the text off the margin. This is done to visually organize code, especially ibn blocks, for easier reading by the human (the computer doesn’t need it).
1 Like