Click here to open String Function Quiz
Wednesday, 9 December 2015
Monday, 7 December 2015
Tuesday, 24 November 2015
Class 8 - Inputbox
There are 4 steps in a program.
1. Declaration (dim)
2. Input the value
3. Calculation(if any)
4.Output(msgbox)
Sunday, 15 November 2015
Thursday, 5 November 2015
Classs 6 - QBASIC
Ch 9 QBASIC statements
QBASIC is programming language, which is suitable for a beginner who wants to learn a programming language. It is simple and super easy.
Character Set :
It is the set of characters allowed to use in QBASIC.
It consists of
I. alphabets(a- z and A - Z)
II. numbers (0 to 9)
III. special characters (@,!,#,?,;,. etc
Constants :
The values which do not change are called constants. There are two types Numeric constant and String constant.
Numeric Constant :
- It includes whole numbers ,decimal numbers.
- It can be a positive number or a negative number.
- Should not have special characters.
Valid numeric constants :
124
45.78
- 7
Invalid numeric constants :
Rs.500
#1
String Constants :
- It includes alphabets ,numbers and special characters.
- Should be within double quotes.
Valid string constants :
"Cotton Boys"
"Computers"
"150 years"
Invalid string constants
Bangalore (because no quotes)
Variables
The values that may or may not change are called variables. There are two types
- Numeric Variable
- String Variable
It stores numeric constants. There are some rules in naming a variable.
- It should start with an alphabet.
- Remaining letters if any, can be an alphabet or a number.
- No reserved words(like let, input, print, rem, cls .. etc)
- No special characters.
- A
- sum
- X5
- sum of - (space)
- 8line - (First letter is number)
It stores string constants.
- It should start with an alphabet.
- Remaining letters if any, can be an alphabet or a number.
- No reserved words(like let, input, print, rem, cls .. etc)
- No special characters except $.
- It should end with a $ symbol.
- boy$
- d3$
- comp$
Tuesday, 6 October 2015
Class 8-Prog(Swap)
Pg :103 Q4
Swapping means exchanging . Here the values of 2 variables should be exchanged.
Imagine you have 2 jars with different liquids. You need to swap the liquids. What will you do? You will take one more jar to do this. Same technique we are applying here too.
We need the third variable to swap the given values.
Swapping means exchanging . Here the values of 2 variables should be exchanged.
Imagine you have 2 jars with different liquids. You need to swap the liquids. What will you do? You will take one more jar to do this. Same technique we are applying here too.
We need the third variable to swap the given values.
Class 8 -Sample Programs
1. Assign three numbers and find the average
Private Sub Command1_Click()
Dim a, b, c As Integer ...................... Step 1 (Decaration)
Dim avg As Integer ....................... Step 1
a = 2 ........................ Step 2 (Assign)
b = 3 ........................ Step 2
c = 14 ........................ Step 2
avg = (a + b + c) / 3 ........................ Step 3 (Calculation)
Print avg ........................ Step 4 (Display )
End Sub
The answer for the above program is (14+2+3)=19/3=6.33333
but we will get 6, because the data type of avg is integer,which will give only whole number.
To get the correct answer, we have to change the data type.
Private Sub Command1_Click()
Dim a, b, c As Integer
Dim avg As double
a = 2
b = 3
c = 14
avg = (a + b + c) / 3
Print avg
End Sub
2. Accept the side of a square, and display its perimeter.
Perimeter=4 x side
Private Sub Command1_Click()
Dim side ,peri As Integer .......... (Decaration)
side=val(text1.text) ........... (Input)
peri=4 * side ........... (Calculation)
Print peri ........... (Display )
End Sub
3. Area of rectangle = Length x breadth
Private Sub Command1_Click()
Dim l,b,area As Integer .......... (Decaration)
l = val(text1.text) ........... (Input)
b = val(text2.text)
area = l*b ........... (Calculation)
Print area ........... (Display )
End Sub
In the above program, we should use two text boxes to accept length and breadth from the user. * should be used for multiplication symbol.
4. Volume of a sphere = 4/3 pi r3
Private Sub Command1_Click()
Dim r As Integer .......... (Decaration)
Dim vol as double .......( The answer will be in decimal since we are multiplying by 3.14)
r = val(text1.text) ........... (Input)
vol = 4/3 * 3.14 *r*r*r ........... (Calculation)
Print vol ........... (Display )
End Sub
We cannot use the symbol for pi, so we have to use the value which is 3.14.
Instead of r*r*r we can also use r^3
5. Volume of Cylinder = pi r2 h
Private Sub Command1_Click()
Dim r,h As Integer
Dim vol as double .......( The answer will be in decimal since we are multiplying by 3.14)
r = val(text1.text)
h = val(text2.text)vol = 3.14 *r*r*h OR ( 3.14* r^2 *h)
Print vol
End Sub
Private Sub Command1_Click()
Dim a, b, c As Integer ...................... Step 1 (Decaration)
Dim avg As Integer ....................... Step 1
a = 2 ........................ Step 2 (Assign)
b = 3 ........................ Step 2
c = 14 ........................ Step 2
avg = (a + b + c) / 3 ........................ Step 3 (Calculation)
Print avg ........................ Step 4 (Display )
End Sub
The answer for the above program is (14+2+3)=19/3=6.33333
but we will get 6, because the data type of avg is integer,which will give only whole number.
To get the correct answer, we have to change the data type.
Private Sub Command1_Click()
Dim a, b, c As Integer
Dim avg As double
a = 2
b = 3
c = 14
avg = (a + b + c) / 3
Print avg
End Sub
2. Accept the side of a square, and display its perimeter.
Perimeter=4 x side
Private Sub Command1_Click()
Dim side ,peri As Integer .......... (Decaration)
side=val(text1.text) ........... (Input)
peri=4 * side ........... (Calculation)
Print peri ........... (Display )
End Sub
3. Area of rectangle = Length x breadth
Private Sub Command1_Click()
Dim l,b,area As Integer .......... (Decaration)
l = val(text1.text) ........... (Input)
b = val(text2.text)
area = l*b ........... (Calculation)
Print area ........... (Display )
End Sub
In the above program, we should use two text boxes to accept length and breadth from the user. * should be used for multiplication symbol.
4. Volume of a sphere = 4/3 pi r3
Private Sub Command1_Click()
Dim r As Integer .......... (Decaration)
Dim vol as double .......( The answer will be in decimal since we are multiplying by 3.14)
r = val(text1.text) ........... (Input)
vol = 4/3 * 3.14 *r*r*r ........... (Calculation)
Print vol ........... (Display )
End Sub
We cannot use the symbol for pi, so we have to use the value which is 3.14.
Instead of r*r*r we can also use r^3
5. Volume of Cylinder = pi r2 h
Private Sub Command1_Click()
Dim r,h As Integer
Dim vol as double .......( The answer will be in decimal since we are multiplying by 3.14)
r = val(text1.text)
h = val(text2.text)vol = 3.14 *r*r*h OR ( 3.14* r^2 *h)
Print vol
End Sub
Monday, 5 October 2015
Tuesday, 29 September 2015
Class 7 - Ch 7
Formatting tags
The formatting tags are used to give a stylish appearance to the text in the web page.
Bold
The text appears darker.
<b> ..... </b>
Italics
The text appears different(slanting).
<I>....</I>
Underline
There is a line below the text.
<U>.....</U>
Strikethrough
A line is drawn across the text.
<Strike>....</Strike>
Superscript
Text appears above the text.
<Sup>....</Sup>
Subscript
Text appears below the text
<Sub>.....</Sub>
Center
Text appears in the middle of the screen.
<Center>....</Center>
<html>
<head>
<title>
Friends
</title>
</head>
<body bgcolor=olive text =white>
<center><h1>FRIENDS</h1></center>
Written with a pen, sealed with a kiss,<br>
If you are my <b>friend </b>, please answer me this:<br>
Are we friends, or are we not?<br>
You told me once, but I <I> forgot</I>.<br>
So tell me now, and tell me <u>true</u>,<br>
So I can say I'm here for you.<p>
Of all the friends I've ever met,<br>
You're the one I won't forget.<br>
And if I die before you do,<br>
I'll go to <b><I> Heaven </I></b>and wait for you,<br>
I'll give the <font color=red><h2>angels</h2></font> back their wings<br>
And risk the loss of everything.<br>
There isn't a thing I wouldn't do,<br>
To have a friend just like you!
<p align =right>The true author is unknown
</body>
</html>
OUTPUT
Monday, 28 September 2015
Class 9 - Scanner
Input Method:
We are going to use Scanner for accepting values from the user . Its a simple one.
First include the package util.
import java.util.*;
Only small letters and * indicates all the files from the package and there is a semi colon in the end.
Then comes the main function
public static void main( )
{
Scanner S=new Scanner(System.in);
Remember S in red colour are capital letters. Here S is a variable can be in small or capital letter or any other variable name.
There are different statements for accepting different data type values.
int a= S.nextInt( );
float f= S.nextFloat( );
double x=S.nextDouble( );
But accepting character and string are different.
char ch=(char)System.in.read( );
String st=S.next( );
String st1=S.nextLine( );
next( ) accepts a word till a space and keeps the cursor in the same line.
nextLine( ) accepts words and moves the cursor to the next line after accepting the value.
Let us accept two numbers.
import java.util.*; ------------------------------------ 1
class ex1
{
public static void main( )
{
Scanner s=new Scanner(System.in); --------------- 2
int a, b,sum; --------------------------------------------- 3
System.out.println("Enter the first number"); ------ 4
a=s.nextInt( ); ------------------------------------------- 5
System.out.println("Enter the second number");----- 4
b=s.nextInt( );-------------------------------------------- 5
sum=a+b; -------------------------------------------------6
System.out.print("Total = " +sum);------------------- 7
}
}
1 is the first line in the program.
2 Write any variable instead of s , if you want.
3 is variable declaration.
4 is just a prompt message. A remainder to the user to enter a number.
5 Since I am accepting integer values, it should be nextInt. Remember no space after next and I in Int is capital.
6 is the calculation
7 is the output.
For other programs step 3 and step 5 will be different according to the data type you use.
We are going to use Scanner for accepting values from the user . Its a simple one.
First include the package util.
import java.util.*;
Only small letters and * indicates all the files from the package and there is a semi colon in the end.
Then comes the main function
public static void main( )
{
Scanner S=new Scanner(System.in);
Remember S in red colour are capital letters. Here S is a variable can be in small or capital letter or any other variable name.
There are different statements for accepting different data type values.
int a= S.nextInt( );
float f= S.nextFloat( );
double x=S.nextDouble( );
But accepting character and string are different.
char ch=(char)System.in.read( );
String st=S.next( );
String st1=S.nextLine( );
next( ) accepts a word till a space and keeps the cursor in the same line.
nextLine( ) accepts words and moves the cursor to the next line after accepting the value.
Let us accept two numbers.
import java.util.*; ------------------------------------ 1
class ex1
{
public static void main( )
{
Scanner s=new Scanner(System.in); --------------- 2
int a, b,sum; --------------------------------------------- 3
System.out.println("Enter the first number"); ------ 4
a=s.nextInt( ); ------------------------------------------- 5
System.out.println("Enter the second number");----- 4
b=s.nextInt( );-------------------------------------------- 5
sum=a+b; -------------------------------------------------6
System.out.print("Total = " +sum);------------------- 7
}
}
1 is the first line in the program.
2 Write any variable instead of s , if you want.
3 is variable declaration.
4 is just a prompt message. A remainder to the user to enter a number.
5 Since I am accepting integer values, it should be nextInt. Remember no space after next and I in Int is capital.
6 is the calculation
7 is the output.
For other programs step 3 and step 5 will be different according to the data type you use.
Sunday, 27 September 2015
Class 7 -List
List
Lists are used when we want to display the information in points.
There are three types of lists.
Ordered List
Unordered List
Description List
Ordered List :
- <ol > - Default list. It gives the numbers.
- <ol type=A>
- <ol type=a>
- <ol type=I>
- <ol type=i>
Output :
Unordered List
- Disc - Default list
- Circle
- Square
Description List
Output :
Nested List
Output :
Friday, 18 September 2015
Wednesday, 16 September 2015
Class 7 - Line
The above output has 5 lines. The first one is a thin line, because there is no size tag.
<html>
<head>
<title> Example 3</title>
</head>
<body>
<hr > <p>
<hr size=3 color=red> <p>
<hr size=8 color=green></p>
<hr size=3 align=right color=blue><p>
<hr size=3 noshade ></p>
</body>
</html>
2.
<html>
<head>
<title> Example 4</title>
</head>
<body>
<font size=1 color=crimson>
We the Cottonians <br></font>
<font size=2 color=blue>
We are all here<br></font>
<font size=3 color=gold>
We want to do YES <br></font>
<font size=5 color=green>
Always our best<br></font>
<font size=4 color=purple>
Our motto is <br></font>
<font size=5 color=olive>
NEC DEXTRORSUM NEC SINSITRORSUM<p>
<font size=6 color=crimson>
Hip Hip Hurrah.......
</body>
</html>
<html>
<head>
<title> Example 3</title>
</head>
<body>
<hr > <p>
<hr size=3 color=red> <p>
<hr size=8 color=green></p>
<hr size=3 align=right color=blue><p>
<hr size=3 noshade ></p>
</body>
</html>
2.
<html>
<head>
<title> Example 4</title>
</head>
<body>
<font size=1 color=crimson>
We the Cottonians <br></font>
<font size=2 color=blue>
We are all here<br></font>
<font size=3 color=gold>
We want to do YES <br></font>
<font size=5 color=green>
Always our best<br></font>
<font size=4 color=purple>
Our motto is <br></font>
<font size=5 color=olive>
NEC DEXTRORSUM NEC SINSITRORSUM<p>
<font size=6 color=crimson>
Hip Hip Hurrah.......
</body>
</html>
Class 7 - Heading Tag
Heading tag:
There are 6 heading tags. <h1> is the biggest tag and <h6> is the smallest.
Since the text attribute is used to change the colour, the entire document will have the same colour. Whereas if you use <font color> then you can have different colours.
<html>
<head>
<title> Worksheet 4 </title>
</head>
<body bgcolor=purple text=white>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
</body>
</html>
There are 6 heading tags. <h1> is the biggest tag and <h6> is the smallest.
Since the text attribute is used to change the colour, the entire document will have the same colour. Whereas if you use <font color> then you can have different colours.
<html>
<head>
<title> Worksheet 4 </title>
</head>
<body bgcolor=purple text=white>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
</body>
</html>
Class 8 - Inputbox
There are 4 steps in a program.
1. Declaration (dim)
2. Assign / Input the value
3. Calculation(if any)
4.Output(Msgbox/Print)
Class 8 - Activity(Pg 86)
1. Declare the integer variables x,y and z
Dim x,y,z as Integer
2. Assign values 5 to x, 10 to y and 15 to z
x=5
y=10
z=15
3. What are the values of C, N1, N2, N3 :
A=5
B=10
C=A+B
N1=A+10
N2=B
N3=5+N2
C=15( since A is 5 and B is 10)
N1=15 ( A is 5 and add 10 to it)
N2=10(B is 10)
N3=15 (N2 is 10 and add 5 to it)
3. Declare a string variable Friend, a numeric variable Num1 to store a decimal value. Assign the value 'Vedika' to the string variable created above.
dim Friend as String
dim Num1 as double
Friend = Vedika
Class 8 - Declaring a variable
Declaring a variable is used to reserve space in memory. There are 2 types of variable declaration:
Dim statement is used to declare a variable.
- Implicit declaration
- Explicit declaration
Implicit Declaration :
Whenever VB comes across a variable, it is assigned a default data type.
Explicit Declaration :
When the user wants to specify the data type of the variable, then it is called declaring explicitly.
Whenever VB comes across a variable, it is assigned a default data type.
Explicit Declaration :
When the user wants to specify the data type of the variable, then it is called declaring explicitly.
Dim statement is used to declare a variable.
Syntax :
dim variable name as data type
Example :
dim a,b,c as Integer
dim m as single, i,j as Integer
String variable declaration :
String declaration is little different from other data type declaration.
There are two types of string declaration.
Assigning a value :
Once the variable is assigned a data type, the value should be given to it.
To declare and assign one variable :
dim a as integer
a=100
or
dim a as integer = 100
To declare more than one variable :
dim a,b,c as integer
a=10
b=20
c=30
dim variable name as data type
Example :
dim a,b,c as Integer
dim m as single, i,j as Integer
String variable declaration :
String declaration is little different from other data type declaration.
There are two types of string declaration.
- Variable Length
- Fixed Length
If we want to enter a data of any length then it is variable length.
dim name as string
If we want to enter a data with a particular length, then it is called fixed length.
dim name as string * 3
In the above example we can enter a string with 3 characters only.
Assigning a value :
Once the variable is assigned a data type, the value should be given to it.
To declare and assign one variable :
dim a as integer
a=100
or
dim a as integer = 100
To declare more than one variable :
dim a,b,c as integer
a=10
b=20
c=30
Tuesday, 15 September 2015
Class 8 - Introduction
Visual Basic
Visual basic was derived from the language BASIC.
BASIC has its own limitations., it is a simple programming language but used only in a text based environment. But visual basic is
User friendly
Supports Graphical User Interface(GUI)VB
VB is an Event- driven programming, which means the flow of the program is determined by an Event.
An Event is an action performed either by mouse click, double click or pressing keys on the keyboard.
Integrated Development Environment describes the interface and the environment we use to create our own applications.
1. Form design window
2. Tool box
3. Menu bar
4. Project explorer
5. Properties window
6. Form layout
Project Explorer Window
It lists all the forms in the project. The components of the window are:
- View code
- View object
- Toggle folders
- Project name
- Forms folder
- form module
Properties Window
It displays the properties like font name, caption, background colour etc of the selected object on the form.
A form is saved with an extension .frm .
A project is saved with an extension .vbp .
To execute the visual basic program :
- Click Run from Start option
- Click start on the Toolbar
- Press F5 key
Class 8 - Data Type in VB
A data type determines what type of values a variable can hold.
In numbers we have different types like 5(whole number), 6.9(decimal number).
The computer memory is made up of storage areas which will hold the values.
When we give a value to a variable, the computer will allocate space in the memory to hold the variable. The storage space will be different for different values, based on the type of value.
Data types :
Natural Numbers
In numbers we have different types like 5(whole number), 6.9(decimal number).
The computer memory is made up of storage areas which will hold the values.
When we give a value to a variable, the computer will allocate space in the memory to hold the variable. The storage space will be different for different values, based on the type of value.
Data types :
Natural Numbers
- byte
- integer
- long
Byte : Number ranges from 0 to 255.
Integer : Larger than byte. Ranges from -32,768 to 32,767
Long : It can hold more than integer. To store very large number.
Decimal Numbers
- Single
- Double
Single : To store decimal values. Less Precision.
Double : Large decimal numbers. Very precise values.
String :
It is also called alphanumeric (i.e) alphabets and numbers. It can be a word, group of words, numbers .
Boolean :
This value can be either true or false.
Variant :
It can represent any value.
Date :
It stores vales from 1/1/100 to 12/3/9999.
Date :
It stores vales from 1/1/100 to 12/3/9999.
Friday, 21 August 2015
Class 8 - Operators
Ch : 5 Operators and Functions
In this chapter we are going to learn about the basic steps such as variable, data type, operator in writing a program.
1. Variable :
The value is going to change every time.
x=3 , here x is a variable.
Rules for naming a variable :
1. First character should be a letter.
2. Other characters may be letter,digit.
3. No special characters except underscore( _ ).
4. Maximum limit is 255 characters.
5. Keywords are not allowed.
Examples :
1. a - Valid variable
2. s1 - Valid variable
3. Computer_Science - Valid variable
Identify the valid and invalid variables :
1. _123 - Invalid variable(Should start with an alphabet)
2. Bond007 - Valid variable
3. Cotton Boys - Invalid variable(Special character space)
4. Middle - Valid variable
5. ProgRam - Valid variable
6. A * b - Invalid variable(Special character *)
Class Schedule
24th August to 1st September
Std 7 :
Lab :Ch 7: Formatting tags (bold,italics,underline,center,superscript,subscript,hr and image tags)
Theory :Ch 7 exercise and Ch :8 Lists
Std 8 :
Ch 4 :
Lab :Designing forms in the lab (command button, msg command, Checkbox Option button)
Theory :
Ch 5:
Operators((Data types, Declaring a variable, Assigning a value)
Std 9 :
Lab : Ms Excel
Simple programs in Java using Blue J method.
Introduction to scanner.Std 10 :
Lab : String programs.
String functions(substring , charAt,trim,endswith,startswith,toUpperCase, toLowerCase)
Thursday, 20 August 2015
Class Schedule
17th August to 21st August
Std 7 :
Ch 7: Formatting tags (bold,italics,underline,center,superscript,subscript,hr and image tags)
Std 8 :
Ch 4 :
Designing forms in the lab (Label,Textbox,commandbutton)
Ch 7:
Operators(Arithmetic and Relational ).
Std 9 :
Lab : Ms Excel
Simple programs in Java using Blue J method.
Std 10 :
Lab : Constructors and String programs.
String functions(substring , charAt,trim,endswith,startswith)
Monday, 20 July 2015
Photoshop Revision
- Photoshop is used to import, edit, customize images.
- Photoshop was code named as Liquid Sky.
- File extension is .psd
- Magic wand tool selects similarly colored images.
- Magic eraser tool erases with a single click.
- Dodge tool lightens areas in image.
- Burn tool darkens areas in an image.
- Sponge tool changes the color saturation of an area.
- Zoom tool magnifies and reduces the view of an image.
- Hand tool moves an image.
- By default , a new image has a single layer called the Background.
- Double click on the layer to type a new name
- Channels are used for storing information about color elements.
- Filter gallery allows us to apply many different filters to a layer.
- Masks are used to change one part of an image without affecting the rest of the image.
- Quick mask lets the user create and view temporary mask for an image.
- Layer Palette controls the layers in an image.
- Group of layers is called Layer Sets.
- Filters are used to add different types of special effects to an image.
- Color Modes :
Friday, 17 July 2015
Thursday, 16 July 2015
Wednesday, 15 July 2015
Thursday, 2 July 2015
Portion I Unit Test -2015
Std VII
1. Ch # 1 : Network and Communication
2. Ch # 6 : Introduction to HTML
Std VIII
1. Ch # 1 : Adobe Photoshop
2. Ch # 13 : Virus and Anti Virus
Std IX
1. Ch # 6 : Ms Word
2. Ch # 11 : Elementary concepts of objects and classes
3. Ch # 12 : Introduction to Java
4. Ch # 13 : Values and Types
Std X
Java Std 9 Portion .
Function or Methods
Friday, 26 June 2015
Class 7 - Introduction to HTML
HTML
HTML (Hyper Text MarkUp Language) is used to create web pages. The codes are called tags. The tags are given within < and >.
There are two types of tags ,
i. Container Tag : It has both opening and closing tags.
e.g : <html> </html>
ii. Empty Tag : It has only a opening tag.
e.g : <br>
e.g : <br>
The basic structure of a HTML document is
<html>
<head>
<title>
</title>
</head>
<body>
………
……..
</body>
</html>
Whatever is typed between <title> and </title> will be displayed on the title bar not in the web page.
<html>
</head>
<body>
Your text goes here.
Your text goes here.
</body>
</html>
<head><title> My Page BCBS</title>
</head>
<body>
Bishop Cotton Boys' School
</body>
</html>
The data entered between <body> and </body> only will be displayed in the web page.
Line break tag <br>:
It moves the cursor to the next line.
Paragraph Tag <p> :
It leaves a blank line.
Line break tag <br>:
It moves the cursor to the next line.
Paragraph Tag <p> :
It leaves a blank line.
<head><title> My Page BCBS</title>
</head>
<body>
BCBS <p>
</html>
Wednesday, 24 June 2015
Subscribe to:
Posts (Atom)