Monday, 14 March 2016

Class 8 - Repetition Programming(For)

Loops

If we want to repeat a set of statements , looping statements are used.
There are two types :
  • For ... Next
  • Do ....Loop

For ... Next

Probably this is the easiest of the looping statements. The general form is given as

For variable=initial value to final value step value
--------------
-------------
Next variable

1. Display the numbers from 1 to 10.

Dim a as integer
For a=1 to 10
Print a
Next a

Note :
  • Step value is used to increment or decrement . In the above program it should have been Step 1, since the difference between two numbers is 1. But Step 1 is the default value so no need to write it.
2. Display the even numbers from 5 to 50

Dim a as integer
For a=6 to 50 step 2
Print a
Next a

3. Display the following numbers:
     100 
     90
     80
     ....
     ....
     10


Dim a as integer
For a=100 to 10 step -10
Print a
Next a

Note :
Here the numbers are in descending order , therefore step -10. 
 

Class 7 - Frames(Revision)


Class 7 - Creating Frames (video)

Sunday, 13 March 2016

Class 7 - Creating Frames

One.html
<html>
<body bgcolor=olive text=white>
<b><center> One</center></b>
</body>
</html>


------------------------------------------------------------------------------------
Two.html
<html>
<body bgcolor=pink text=white>
<b><center> Two</center></b>
</body>
</html>


-----------------------------------------------------------------------------------

<html>
<frameset rows=30%,*>
<frame src=one.html>
<frame src=two.html>
</frameset>
</frameset>


Output :


*******************************************************

<html>
<frameset cols=30%,35%,*>
<frame src=three.html>
<frame src=four.html>
<frame src=five.html>
</frameset>
</frameset>



Output :


---------------------------------------------------------------------------------
<html>
<frameset rows=35%,*>
<frame src=one.html>
<frameset cols=30%,35%,*>
<frame src=three.html>
<frame src=four.html>
<frame src=five.html>
</frameset>
</frameset>
</html>


Output :