I, Zean Leonardo. States that the differents of for loop, and while loop is for loop it runs for a specific number, while while loop runs until a certain condition is no longer present. Also for loop starts at the end, and the while loop just run aslong the condition is not present
Ron Gabriel, E. Jogno G10, STE - Maxwell 1. You use for loops if you are certain about the specific numbers regarding the functionality of program, on the other hand, you should use while loop if you are uncertain. While loops are used so that the program keeps running until a condition is declared untrue. 2. For the first sample, the program counts from 1 - 10 with respect to the selected cell. The function of the second program is to calculate the prices of school supplies, until the program identifies an empty cell. The first program is done with certainty while the second program performs continuous execution of work until a specific condition is met. Furthermore, the second program could be reused again without reprogramming once another set of school supply is added while the first program might need some changes in the code if there is a need to make variations.
Major difference of For loop and While loop is: 1. the for loop only runs a set of a number repetition and its loop stops in a definite time. a while loop runs a set of a number repetition that still uncertain and its loop only stops when the condition is false. 2. the sample in for loop the statement tells that it will count from 1-10 and it will only repeated 10 times. the while loop sample indicates that the number of the loop will only print the value counter of the current cells the process are row by row until you reached cell number 10. -Dyna Jodi Tolete G10 STE Maxwell
Major Difference of For Loop and While Loop: A For Loop runs a set number of times with known repetitions. A While Loop runs until a condition becomes false, with an unknown number of repetitions. Utilization in Sample Programs: In the For Loop example, the program counts from 1 to 10, updating Excel cells exactly 10 times. In the While Loop example, it calculates total prices row by row until it finds an empty cell in column 1. -Jenny Rose E barrogo G10 STE OERSTED
LAJERA, Janielle Faye V. Grade 10 - Oersted 1. What is the major difference of for loop and while loop? A "For loop" repeats a known number of times and stops at a definite point while a "While loop" keeps repeating until a certain condition is no longer true. 2. How are for loop and while loop utilized in the sample programs? In a program that calculates the total price, "for loops" are used when the number of items is known, like if you have a fixed list of supplies. While "while loops" are used when the number of items is unknown, allowing the user to stop by entering a specific condition. In this program, a "do-while loop" is used because it lets the program ask the user for the quantity and price of items first, then check if they want to stop. The key difference with the do-while loop is that it checks if the user wants to stop after asking for input, so the program runs at least once.
1. in for loops the number of repetitions is known on the other hand while loop runs until a specified condition becomes false, the number of repetitions is not known 2. The given example in the for loop prints numbers 1 to 10. In this case, it runs exactly 10 times to display the numbers 1 to 10 in a column. Here, the number of repetitions is known. The example in the while loop calculates the total price of an item. In this case, it calculates the total price for each item until it reaches an empty cell. Here, the number of repetitions is unknown. - Paulo, Gian Carlo F. G10 STE OERSTED
I, Zean Leonardo.
States that the differents of for loop, and while loop is for loop it runs for a specific number, while while loop runs until a certain condition is no longer present. Also for loop starts at the end, and the while loop just run aslong the condition is not present
Ron Gabriel, E. Jogno
G10, STE - Maxwell
1. You use for loops if you are certain about the specific numbers regarding the functionality of program, on the other hand, you should use while loop if you are uncertain. While loops are used so that the program keeps running until a condition is declared untrue.
2. For the first sample, the program counts from 1 - 10 with respect to the selected cell. The function of the second program is to calculate the prices of school supplies, until the program identifies an empty cell. The first program is done with certainty while the second program performs continuous execution of work until a specific condition is met. Furthermore, the second program could be reused again without reprogramming once another set of school supply is added while the first program might need some changes in the code if there is a need to make variations.
Major difference of For loop and While loop is:
1. the for loop only runs a set of a number repetition and its loop stops in a definite time. a while loop runs a set of a number repetition that still uncertain and its loop only stops when the condition is false.
2. the sample in for loop the statement tells that it will count from 1-10 and it will only repeated 10 times. the while loop sample indicates that the number of the loop will only print the value counter of the current cells the process are row by row until you reached cell number 10.
-Dyna Jodi Tolete G10 STE Maxwell
Major Difference of For Loop and While Loop:
A For Loop runs a set number of times with known repetitions. A While Loop runs until a condition becomes false, with an unknown number of repetitions.
Utilization in Sample Programs:
In the For Loop example, the program counts from 1 to 10, updating Excel cells exactly 10 times. In the While Loop example, it calculates total prices row by row until it finds an empty cell in column 1. -Jenny Rose E barrogo G10 STE OERSTED
LAJERA, Janielle Faye V.
Grade 10 - Oersted
1. What is the major difference of for loop and while loop?
A "For loop" repeats a known number of times and stops at a definite point while a "While loop" keeps repeating until a certain condition is no longer true.
2. How are for loop and while loop utilized in the sample programs?
In a program that calculates the total price, "for loops" are used when the number of items is known, like if you have a fixed list of supplies. While "while loops" are used when the number of items is unknown, allowing the user to stop by entering a specific condition. In this program, a "do-while loop" is used because it lets the program ask the user for the quantity and price of items first, then check if they want to stop. The key difference with the do-while loop is that it checks if the user wants to stop after asking for input, so the program runs at least once.
1. in for loops the number of repetitions is known on the other hand while loop runs until a specified condition becomes false, the number of repetitions is not known
2. The given example in the for loop prints numbers 1 to 10. In this case, it runs exactly 10 times to display the numbers 1 to 10 in a column. Here, the number of repetitions is known. The example in the while loop calculates the total price of an item. In this case, it calculates the total price for each item until it reaches an empty cell. Here, the number of repetitions is unknown.
- Paulo, Gian Carlo F.
G10 STE OERSTED