Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Good day everyone I am justin de leon and we are the group 4 and we will be discussing the lesson

number 10 which is the repetition structure.

Para sakin kasi kapag naririnig ko ang salitang repetition or loop ang naalala ko yung nanay ko na
machine gun kung mag utos paulit ulit sila. Hanggat hindi mo nagagawa yung inuutos nila paulit ulit
nilang ipapaalala sa inyo yun at may freebies pang sisigawan nila kayo kapag di nyo pa din
nagagawa yung inuutos nila diba ang saya hahaha.

Slide 2 and 3
So now let as define the meaning of repetion and loops

Slide 4

In this slide we have 4 kinds of loops and they are the

 The classic Do-loops


 The Do until loops
 The Do while loops
 The for next loop

so mr. delosantos and mr. cemania will disscuss the do until loops, the do while loops and the
next loop

slide 5 and 6

(read the slides )

Format:

So dito it is quite simple, kapag na execute mo na yung code and na reach nya na yung loop
babalik ulit sya sa umpisa ng do loop and execute the same block again. tapos Yung same na
block of codes will be repeatedly to execute until sabihin nya na stop executing.

Do loops
So now papahapyawan ko kayo sa while loop and until loop, sa While loops (both do while and loop
while) ay continue na nag e-execute as long as yung conditional is true. And yung sa Until loop
naman will loop as long as na yung certain condition is false, on the other hand. Ang pag kakaiba
lang naman nila ay between putting either While or Until in the Do section or sa Loop section, so
kapag sinum up natin the Do checks when the loop starts, and Loop checks when the loop ends.
Now I have here the example of do loop
So nag execute sya ng code

Do
Debug.Print "hello"
x = x + 1
Loop Until x = 10

In this example the loop will print hello several times, at naka depende ito sa initial value of x or the
condition. So kung na noticed nyo, sa Do loops wala syang built in counters. However, they may be
made manually gaya ng pinapakita dito. In this case, gumamit sya x as the counter variable, and
every time na ang loop execute, the x increase itself by one. When X reaches 10, the loop will cease
to execute. So ang advantage ng Do loops is that you may exit it kahit kalian mo gusto any certain
conditional is met. You may have it loop as long as a certain variable is false, or true, or as long as a
variable remains in a certain range.

Slide 7 and 8
(read the slides)
So ang  Exit Do statement naman ay nag pro-provide ng alternative way to exit a Do…Loop. And ang Exit
Do transfers control immediately to the statement that follows the Loop statement.

Exit Do is often used after some condition is evaluated, halimbawa in an If...Then...Else structure. You
might want to exit a loop if naka detect ka ng condition that makes it unnecessary or impossible to
continue iterating so ang meaning ng iteration or iterating ito ay isnag proceso wherein yung set of
instructions or structures are repeated in a sequence it is specified number of times or until a condition
is met., such as an incorrect value or a termination request. Ang isa sa mga gamit ng Exit Do is to test for
a condition that could cause an endless loop, which is a loop that could run a large or even infinite
number of times.

You can include any number of Exit Do statements anywhere in a Do…Loop.

When used within nested Do loops, and Exit Do nag tra-transfers ng control out of the innermost loop
and into the next higher level of nesting.

So ang meaning ng nesting ay

It occurs when one programming construct is included within another. Binabawasan nya yung amount of
code na needed, while making it simple para sa mga programmer to debug and also to edit.

Example:

So sa example natin na to, the condition stops the loop when the index variable is greater than 100.
The If statement in the loop, however, causes the Exit Do statement to stop the loop when the index
variable is greater than 10.

I hope you’ve learned a lot from me, so the next reporter will be mr. delosantos and he will tuckled
about the do while loop and and the do until loop.

You might also like