Title: L o o p s
1L o o p s
2Review
- Directions Complete the syntax of the four types
of loop. Type the answers on the space
provided. You are given 8 minutes only to answer
the review activity. The first one is done for
you. - for..next
- lt
- for variable initial value to final value
- statement/s
- next
- gt
32. do whileloop lt variable
declaration ________ the value of the
variable do while ________
statements ________ / decrease the value of
the variable ________ gt
43. do until..loop lt variable
declaration ________ the value of the
variable do ________ condition
statements ________ / decrease the value of
the variable loop gt
54, while..wend lt variable
declaration initialize the value of the
variable ________
condition __________ increase / decrease the
value of the variable ________ gt Be
ready to share your answers to the class. ?
6Hands-on 1
- Make the subfolder named Assignment_1 in the 2nd
Term folder. - Open the Notepad.
- Choose one script only for assignment1. Type
your script in the Notepad. Use loop here. - lthtmlgt
- ltheadgt lttitlegt
- Assignment1 of Jiza Ysmael Jr B
- lt/titlegtlt/headgt
- ltbodygt
- lth3gtThis is the output of assignment1. ltbrgtltbrgt
7Type your ASP script here _______________________
_________ _______________________________ ________
_______________________ lt/bodygt lt/htmlgt 4. Save
the file as assignment1 in the assignment_1
subfolder. 5. View the output using the
browser. Output Sarah 2 Sarah 4 Sarah
6 Sarah 8 Sarah 10
8 7. View the output using the browser. 8. Update
your index. Sample title The Assignment1
Activity (Using for..next loop)
9Hands-on 2
- Make the subfolder named Summation in the 2nd
Term folder. - Open the Notepad.
- Do the script of The Summation Activity.
- Summation of 10 10987654321
- Variables counter and summation
- Output The summation of 10 is equal to 55.
- 4. Type the script in the Notepad.
- lthtmlgt
- ltbodygt
- lt summation0
- for counter1 to 10
- summationsummationcounter
- next
10 response.write(The summation of 10 is
summation) gt 5. Save the file as
summationfornext.asp in the summation
subfolder. 6. View the output using the
browser. TIME FOR EXTRA CHALLENGE!!! 7. Make
a script that shall determine the summation of 10
using do while..loop. Once you get this
correctly, youll get 10/10. Output The
summation of 10 is equal to 55. 8. Save the file
as summationdowhile.asp in the summation
subfolder.
119. Update your index. 10. Get 1/8 cross wise and
rate your output using the rating scale
below 10/10 The scripts of the 2 ASP files
work correctly. 6/10 Only one(1) of the two
ASP scripts works correctly. 4/10 - The
scripts of the 2 ASP files have plenty of
errors. No output was shown. 11. Please
review the syntax and concept of loops.
12Take the seatwork at the Q Online Testing
System. (http//qserver.zobel.dlsu.edu.ph)
Seatwork 1