1. What is looping control flow allowing us to do?
Control flow controls the order that code is executed. looping control flow runs the specified code multiple times.
2. Describe what “loops” do in your own words.
Run a piece of code multiple times.
3. What is the difference between while and do-loops?
The While loop tests the condition before executing any of the statements.
The Do loop tests after statement has been executed. Has to be executed at least once. Example will ask for an email and not move on until you’ve entered one in
4. What is indentation?
Helps the code/blocks stand out and allows it to be more reader friendly.
-
Looping control allows a program to calculate until a perimeter is met, then the program resumes normal procedure.
-
I see loops as a major decision making part of a programs integrity.
-
A while loop may continue adding multiple items, and do loops asks single type questions.
-
Indentation is for ease of reading the program for other programmers. indentation isnt needed. you could write your code in a long line, it just looks neater.
-
Looping control flow allows us to automatically repeat lines of code. This saves work when writing the program, because you don’t have to repeat statements over and over.
-
Loops automatically repeat code. This is generally while certain conditions (boolean value = true) exist. Once those conditions cease to exist (boolean value = false), or if the loop runs into a “break” keyword, the loop will stop and the program will move on to the next statement.
-
Do loops are just like while loops except that do loops execute the code in the body at lease once before it starts asking when it should stop.
-
Indentation is putting spaces in front of lines of code to group it together in ways that make it easier to read by showing where blocks begin and end.
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. They allow you to run a piece of code multiple times.
This is important because it allows us to do less work writing code and not more work.
Loops are a more efficient way to write code for things that are repetitive.
What is the difference between while and do-loops?
While: 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-Loops: A do loop is a control structure similar to a while loop.
The Difference: Only 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.
What is indentation? The role of this 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 blocks inside it.
example:
if (false != true) {
console.log(“That makes sense.”);
if (1 < 2) {
console.log(“No surprise there.”);
}
}
What is looping control flow allowing us to do?
It allows us to run a piece of code multiple times automatically rather than having to write each line separately. The repetition will integrate the state changes of the environment.
Describe what “loops” do in your own words.
They allow a command to be repeated until a certain defined state is reached. The result of each iteration can change the value of a variable. Based on that value the program will then return to perform the command again until it reaches the defined state.
What is the difference between while and do-loops?
A while loop defines the condition that decides the end of the loop first, whereas the do loop executes itself once first before encountering the condition that could end the loop.
What is indentation?
It is not necessary for the program to run, but is rather used to visually separate different nested levels of a program so that they can be distinguished by the programmer or someone reading the code.
- What is looping control flow allowing us to do?
Allows us to run a piece of code multiple times
- Describe what “loops” do in your own words.
Loop repeating a process and force it to be executed number of times in a row until specified conditions appear or criteria are met.
- What is the difference between while and do-loops?
A while loop runs until it reaches a specified value
while(x){y}z;
Do loop runs until it gets any valid input.
do{y}while(x)z;
- What is indentation?
Indentations are spaces in the beginning of lines of code, they make it more readable by programmer. For computer spaces doesn’t matter it can read program as a written all in one line.
What is looping control flow allowing us to do?
-
It allows us to run a piece of code multiple times.
-
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. -
Loops repeat the statement in the function until conditions/values are met or a certain state is achieved. (Usually until the condition is false or reaches a break or return statement). By looping we’re able to automate the iteration process, thus getting the computer to perform a lot of repetitive work.
What is the difference between while and do-loops? -
The while loop, loops through a block of code as long as a specified condition is true.
-
The do loop will execute the code block once, before checking if the condition is true, then it will repeat the loop as long as the condition is true.
What is indentation? -
The role of indentation inside blocks is to make the structure of the code stand out.
-
These spaces are not required — the computer will accept the program just find without them, you could write a program as a single long line if you felt like it.
1.What is looping control flow allowing us to do?
Allows repeating a set of instructions a number of times based on conditions
2.Describe what “loops” do in your own words.
Allows repeating a set of instructions/functions a number of times based on conditions
3.What is the difference between while and do-loops?
Basically accompishes much of the same, except that a do loop always executes
its body at least once, before it starts testing condition. The while loop can exit immediately if conditonon is never met
4.What is indentation?
Use of tabs (or just spaces) to indicate blocks of code that belong on the same level - visual only
Hello sir,
Could you elaborate your answer on “What is looping control flow allowing us to do?” By mentioning perimeter I believe you meant as an example? The answer to the question is however missing.
The answer to the question “Describe what “loops” do in your own words ?” does not meet the question criteria. Loops are not inherently used for decision making nor for maintaining program integrity. It is basically a piece of code that is run multiple times based on given logic.
Your answer to “What is the difference between while and do-loops?” does not answer the question adequately.
A while loop tests for your condition and then executes the underlying statements whereas a do-while loop executes the statements once and then checks the condition to decide if it has to repeat it in a loop.
Perhaps you were trying to point out a use case example here.
Please let me know if you have further questions.
Happy learning
Excellent answer sir! Loved how you gave an example for the indentation.
Fixed the indentation to be visible in this forum answer as your contribution.
if (false != true) {
console.log(“That makes sense.”);
if (1 < 2) {
console.log(“No surprise there.”);
}
}
Happy learning
-
The looping control flow allows a piece of code to be executed multiple times and then restart again, with each instance stored in memory, until a condition is met.
-
The looping allows a piece of code to be executed multiple times, with each instance stored in memory, until a condition is met.
-
The while loop will not execute the function if the first instance is false. The Do-loop will atleast run the function once.
-
It is the spacing placed before the code so that it is easier for the programmer to read and understand.
- Looping control flow allows us to repeat the program until it met the requirement sets in the program and then stops it.
- Loops is doing something over and over again.
- Difference between while and do-loops:
While loop will run indefinitely until it is false. Do-loops always runs once whether the condition is true or false.
4.Indentation is a tab or several spaces in front of statements. They dont affect the program but allows people to read easily to what is going on.
-
looping control flow allows us to instruct a program to back to a certain point and in the program and execute again with the current state at the time.
-
loops keep programs iterating the lines of code until a certain value or break is reached.
-
the difference is that do loops has to execute its body at least once.
-
indentation is how a programmer constructs the structure of a program to make it easy to follow and read/audit the program. further it doesn’t affect the computer process or its execution of the program code.
- to go back to some point in the program where we were before and repeat it with our current program state
- Loop runs a piece of code multiple times.
- while loop will keep entering until it hits a value that is true; do loop will execute at least once and will then evaluate if it needs to stop after the first execution.
- extra spaces to indicate where blocks of code begin and end, for a better visual understanding.
-
***What is looping control flow allowing us to do?
it allows us to do an istruction multiple times -
***Describe what “loops” do in your own words.
they do calculation till when a condition is true -
***What is the difference between while and do-loops?
while will not execute the first instruction if the condition is not met. Do will always execute the first loop. -
***What is indentation?
spacing each line according to an order
- to run a piece of code several times
- depends on how you write the code it chose one or an other statement, or it repeat a code all the time till some condition stop the loop, or the loops goes infinit.
- do loops run at least one time for sure
- to make blocks better understandable you put them in a visual line with space or tab. this is not important because you could run the whole code without any space between the symbols.
-
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. -
Loops allow us to run a piece of code multiple times until we get the desired result.
-
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. -
Indenation is the space between characters.
-
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.
Loops has a relation with boolean, it keep executing statements as long as the expression produce a value that is true. -
What is the difference between while and do-loops?
While a do loop differ in one point, this last one always execute the body at least once, and its starts testing whether it should stop only after the first execution. -
What is indentation?
Is keeping building the code in a way that is more readable, by using spaces between blocks, in front of statements …etc
- It allows us to go back to a previous point and repeat a set of instruction with current state/values.
- Loops do allow us to repeat a set of instruction in a specified number of times or until a specified condition is met.
- It is that a “do” loop executes the instruction once before start checking the condition when it should stop.
- Indentation is a concept to make code more readable in human eyes.
Why in Atom all the text becomes white when I type ? Somebody knows?