Loops - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Loops

Description:

Make a subfolder named INCLUDE in the 2nd Term Folder. ... Make the subfolder Loops in the Second Term folder. Open the Notepad. ... – PowerPoint PPT presentation

Number of Views:58
Avg rating:3.0/5.0
Slides: 10
Provided by: pela1
Category:
Tags: loops | subfolder

less

Transcript and Presenter's Notes

Title: Loops


1
My Song
Loops
Initial value End Value
2
i work
What is the function of include directive?
3
Hands-on1
  • Make a subfolder named INCLUDE in the 2nd Term
    Folder.
  • Search for the lyrics of your favorite song and
    also the songs artist on the internet.
  • Use the include directive to display the lyrics
    and any article/news about the artist in the same
    web page.
  • Filenames mysong.asp (lyrics)
  • myartist.asp (article about the artist)
    song.asp (with include directive)

4
4. Evaluate the output using a rating scale in
1/8 cross wise of paper. Rating Scale 10-
The script is correct. The output of mysong.asp
and myartist.asp are displayed in the
web page. 6- The script has a minor error. Only
one output is displayed in the web page. 4-
The script has a many errors. No output is
displayed in the web page.
5
Think think think
T F 1. The content or output of files
can be included _ _ in a single
file. 2. Loops always have the same syntax.
_ _ 3. The same output can be
achieved using _ _ different loops.
6
Hands-On
  • Make the subfolder Loops in the Second Term
    folder.
  • Open the Notepad.
  • Type the script below in the Notepad
  • FOR..NEXT
  • lthtmlgt
  • ltbodygt
  • lt for index 1 to 10 response.write(inde
    x ltbrgt) next gt
  • lt/bodygt
  • lt/htmlgt
  • 4. Save the script as fornext.asp in the Loops
    subfolder .

7
  • Do whileloop
  • Open the Notepad
  • 2. Type the script below in the Notepad
  • lthtmlgt
  • ltbodygt
  • lt
  • thenumber1do while thenumberlt10
  • response.write(thenumber " is less than 10
    ltbrgt") thenumber thenumber 1 loop
    gt
  • lt/bodygt
  • lt/htmlgt
  • 4. Save the script as dowhile.asp in Loops
    subfolder.
  • 5. View the output using the labserve.

8
  • Do untilloop
  • 1. Open the Notepad
  • 2. Type the script below in the Notepad
  • lthtmlgt
  • ltbodygt
  • lt
  • thenumber3do until thenumber8
  • response.write(thenumber ltbrgt)
    thenumber thenumber 1 loop gt
  • lt/bodygt
  • lt/htmlgt
  • 4. Save the script as dountil.asp in Loops
    subfolder.
  • 5. View the output using the labserve.

9
  • Whilewend
  • Open the Notepad
  • 2. Type the script below in the Notepad
  • lthtmlgt
  • ltbodygt
  • lt
  • x1 while xlt6
  • response.write(Hi there! ltbrgt") xx
    1 wend gt
  • lt/bodygt
  • lt/htmlgt
  • 4. Save the script as whilewend.asp in Loops
    subfolder.
  • 5. View the output using the labserve.
Write a Comment
User Comments (0)
About PowerShow.com