Hsslive Model Computer App Practical Record Book
Hsslive Model Computer App Practical Record Book
COMPUTER APPLICATION
Practical Record Book
N ame : ………………………………………………….
Exam Reg No : ………………………………………………….
�
�
�
CERTIFICATE
�
This is to certify that this is a bonafide Record of Practical work done by
Mr/Miss/Mrs: _______________________________________, Reg No:________
______________for the Higher secondary Course in Commerce in the year ______
- _______.
Teacher in Charge
Exam Date:
External Examiner:
�
�
�
�
�
�
�
INDEX
SL N o N ame Date Remarks
C++
1 Check Number Positive ,Negative or Zero
2 Simple Interest
3 Area of Circle ,Rectangle, Triangle
4 Sum of Digits of Number
5 Multiplication Table of a Number
6 Sum of Squares of a Number
7 Length of String
8 Find Largest from three
9 Display digit name using switch
10 Factorial Using function
or Define a function to swap three variables
HTML & JAVASCRIPT
11 Kerala Tourism
12 Definition List of Nobel Prize Winners
13 Hyper Link
14 Table Class
15 Table Speed Limit
16 Frameset Sample
17 Login Form
18 Uppercase and Lowercase
19 Sum of Numbers
20 Capital of states
or Kerala Tourism List
SQL
21 SQL Student
22 SQL Employee
23 SQL Stock
24 SQL Bank
25 SQL Book
�
�
1.Aim: Program to check the given number is positive ,negative or zero
Procedure: (Coding)
#include<iostream>
using namespace std;
int main()
{
int n;
cout<<"Enter a number";
cin>>n;
if(n>0)
cout<<"The number is positive";
else if(n<0)
cout<<"The number is negative";
else
cout<<"The number is Zero";
return 0;
}
Output
�
2.Aim: Input the principal amount, type of account (C for current a/c or S for SB a/c) and
number of years, and display the amount of interest. Rate of interest for current a/c is
8.5% and that of SB a/c is 6.5%.
Procedure:( Coding)
#include<iostream>
using namespace std;
int main( )
{
int p,n;
float i;
char type;
cout<<"Enter the Principle amount";
cin>>p;
cout<<"Enter the number of years";
cin>>n;
cout<<"Enter the type of account c for current or s for Savings Bank "<<"\n";
cin>>type;
if(type=='c')
i=p*n*8.5/100;
if(type=='s')
i=p*n*6.5/100;
cout<<"interest="<<i;
}
Output
�
3. Aim: Find the area of a rectangle, a circle and a triangle. Use switch statement for
selecting an Option from a menu.
Procedure:
#include<iostream>
using namespace std;
int main()
{
int ch,l,w,r,b,h;
float area;
cout<<"1.Area of Rectangle"<<"\n";
cout<<"2.Area of Circle"<<"\n";
cout<<"3.Area of Triangle"<<"\n";
cout<<"Enter your choice";
cin>>ch;
switch(ch)
{
case 1:
cout<<"Enter the Length and W idth";
cin>>l>>w;
area=l*w;
cout<<"Area of Rectangle="<<area;
break;
case 2:
cout<<"Enter the radius";
cin>>r;
area=3.14*r*r;
cout<<"Area of Circle="<<area;
break;
case 3:
cout<<"Enter the base and height";
cin>>b>>h;
area=0.5*b*h;
cout<<"Area of Triangle="<<area;
break;
default :
cout<<"Invalid Input";
}
}
Output
�
4. Aim: Program to Find the sum of the digits of an integer number.
Procedure:Coding
#include<iostream>
using namespace std;
int main()
{
int n,rem,s=0;
cout<<"Enter a digit";
cin>>n;
while(n>0)
{
rem=n%10;
s=s+rem;
n=n/10;
}
cout<<"Sum="<<s;
}
Output
�
Procedure:Coding
#include<iostream>
using namespace std;
int main()
{
int n,i;
cout<<"Enter a number";
cin>>n;
for(i=1;i<=12;i++)
{
cout<<i<<"*"<<n<<"="<<n*i;
cout<<"\n";
}
}
Output
�
6. Aim: Find the sum of the squares of the first N natural numbers without using
any formula
Procedure:Coding
#include<iostream>
using namespace std;
int main()
{
int n,sum=0,i;
cout<<"Enter a digit";
cin>>n;
for(i=0;i<=n;i++)
{
sum=sum+i*i;
}
cout<<"Sum of the squares ="<<sum;
}
Output
�
Procedure:Coding:
#include<iostream>
#include<cstdio>
using namespace std;
int main( )
{
char name[1000];
int count=0;
cout<<"Enter the String\n";
gets(name);
while(name[count]!='\0')
{
count ++;
}
cout<<"The length of the string is"<<count;
Output
�
Procedure:Coding:
#include <iostream>
using namespace std;
int main()
{
int a,b,c;
cout<<"Input three numbers and find largest\n";
cin>>a>>b>>c;
if (a>b && a>c)
{
cout<<a<<" is largest";
}
else if(b>a && b>c)
{
cout<<b<<" is largest";
}
else
{
cout<<c<<" is largest";
}
}
Output
Input three numbers and find largest
54
86
67
86 is largest
�
9.Aim: Input a digit and display the corresponding word using switch
Procedure:Coding:
#include <iostream>
using namespace std;
int main()
{
int d;
cout<<"Input a digit and display word using switch\n";
cin>>d;
switch (d)
{
case 0:
cout<<"Zero"; break;
case 1:
cout<<"One"; break;
case 2:
cout<<"Two"; break;
case 3:
cout<<"Three"; break;
case 4:
cout<<"Four"; break;
case 5:
cout<<"Five"; break;
case 6:
cout<<"Six"; break;
case 7:
cout<<"Seven"; break;
case 8:
cout<<"Eight"; break;
case 9:
cout<<"Nine"; break;
default:
cout<<"Not a digit";
}
}
Output
Input a digit and display the corresponding word using switch
5
Five
�
10.Aim: Find the factorial of a number with the help of a user-defined function.
Procedure:Coding:
#include <iostream>
using namespace std;
double fact(int n)
{
int i,f=1;
for(i=1;i<=n;i++)
{
f=f*i;
}
return f;
}
int main()
{
int n;
cout<<"Input a number\n";
cin>>n;
cout<<" factorial of "<<n<<" = "<< fact(n);
Output
Input a number
7
factorial of 7 = 5040
�
Or .Aim: Define a function to swap the contents of three variables
Procedure:Coding:
#include<iostream>
using namespace std;
void swap(int x,int y,int z)
{
int t;
t=x;
x=y;
y=z;
z=t;
cout<<"\n The values of x,y and z are :";
cout<<x<<"\t"<<y<<"\t"<<z;
}
int main( )
{
int a,b,c;
cout<<"Enter the values of a,b,c";
cin>>a>>b>>c;
cout<<"The values of a,b,c are :";
cout<<a<<"\t"<<b<<"\t"<<c;
swap(a,b,c);
Output
�
�
Aim : Design a simple and attractive webpage for Kerala Tourism.It should contain
features like background/image,heading,text formatting and font tags,images,etc.
Procedure:
<HTML>
<HEAD>
<TITLE>KeralaTourism</TITLE>
</HEAD>
<CENTER>
<BODY background="kerala.jpg">
</CENTER>
<font face=arial>
<B>Kerala at a Glance</B>
<I>Kerala, India's most advanced society: <BR>With hundred percent literacy.<BR>
World-class health care systems. <BR>India's lowest infant mortality and
Highest life expectancy rates.<BR> The highest physical quality of life in India. Peaceful
And pristine,Kerala is India's cleanest state.
</I>
<BR><BR>
<IMG Src="logo.jpg">
<BR><BR><BR>
<U>
Tourist Destinations
</U>
<BR>
<BR>
<IMG Src="boat.jpg">
<IMG Src="houseboat.jpg">
<IMG Src="kathakali.jpg">
<IMG Src="wild.jpg">
<BR>
</BODY>
</HTML>
Output
�
2.AIM: Design a web page as shown below using appropriate list tags
<HTML>
<HEAD>
<TITLE>List of Nobel Laureates from India</TITLE>
</HEAD>
<BODY >
<CENTER><B>
List of Nobel Laureates fromIndia
</B>
</CENTER>
<BR>
<DT><B>Rabindra Nath Tagore</B></DT>
<D D >
He was the first to get Nobel Prize from India. He received
prizeinliterature in 1921. He got Nobel Prize for his collection
ofpoems“Gitanjali”.
</DD>
<BR><BR>
<DT><B>C V Raman</B></DT>
<D D >
He got Nobel for Physics in 1930. He received Nobel Prize
�
forhiscontribution called RamanEffect.
<BR><BR>
</DD>
<DT><B>Mother Teresa</B></DT>
<D D >
Mother Teresa who founded Missionaries of Charity which isactive
in more than 100 countries received Nobel Prize in1979.
</DD>
<BR><BR>
<DT><B>Amartya Sen</B></DT>
<D D >
Amartya Sen was awarded Nobel Prize in 1998 in Economics. Hehas
made contributions to welfare economics, social choice theoryetc.
</DD>
<BR><BR>
<DT><B>Kailash Satyarthi</B></DT>
<D D >
He is a child right activist who founded “Bachpan BachaoAndolan”
in 1980. He shared Nobel prize for peace in2014.
</DD>
</BODY>
</HTML>
�
3. AIM: Design a simple webpage about your school.Create another webpage named
address.html containing the school address.Give link from school page to address.htm.
�
Procedure
School.html
<HTML>
<HEAD>
<TITLE>MY SCHOOL</TITLE>
</HEAD>
<BODY>
<CENTER>
<H1>AKM HSS KOTTOOR</H1><BR><BR>
<B>My SCHOOL is AKM Higher Secondary School,Panikkar Kundu,Indianoor PO,My School Contains about 4500
students studying from 5th to Plus Two</B><BR>
<H 2 >
<A Href="ADDRESS.HTM">About</A> </H2>
<BR>
<IMG Src="SCHOOL.JPG">
<BR><BR>
</CENTER>
</BODY>
</HTML
Address.html
<HTML>
<HEAD>
<TITLE>ADDRESS</TITLE>
</HEAD>
<BODY bgcolor=yellow>
<CENTER>
<B>ABOUT</B>
<BR>
<H 2 >
AKM HSS KOTTOOR<BR>
INDIANOOR PO<BR>
KOTTOOR<BR>
MAL APPURAM DT<BR>
KERAL A 676503<BR>
</H2>
</CENTER>
</BODY>
</HTML>
�
�
4. AIM: . Design the following table using HTML
<HTML>
<HEAD>
<TITLE>SCHOOL</TITLE>
</HEAD>
<BODY>
<TABLE BORDER="1">
<TR>
<TH ROWSPAN="2">Class</TH>
<TH colspan="3">Strength</TH>
</TR>
<TR>
<TH>Science</TH>
<TH>Commerce</TH>
<TH>Humanities</TH>
</TR>
<TR>
<TH>PlusOne</TH>
<TD>49</TD>
<TD>50</TD>
<TD>48</TD>
</TR>
<TR>
<TH>PlusTwo</TH>
<TD>50</TD>
<TD>50</TD>
<TD>49</TD>
</TR>
</TABLE>
</BODY>
</HTML>
�
<HTML>
<HEAD>
<TITLE>Speed_Limit</TITLE>
</HEAD>
<BODY>
<TABLE BORDER="1">
<CAPTION><B>Speed Limits in Kerala</B></CAPTION>
<TR>
<TH> Vehicles </TH>
<TH > Near School<BR> (In Km/hour) </TH>
<TH> Within Corporation/<BR> Municipality<BR> (In Km/hour) </TH>
<TH > In other<BR> roads<BR> (In Km/hour) </TH>
</TR>
<TR>
<TH >Motor Cycle</TH>
<TH>25</TH>
<TH>40</TH>
<TH>50</TH>
</TR>
<TR>
<TH >Motor Car</TH>
<TH>25</TH>
<TH>40</TH>
<TH>70</TH>
</TR>
<TR>
<TH >Light motor vehicles</TH>
<TH>25</TH>
<TH>40</TH>
<TH>60</TH>
</TR>
<TR>
<TH >Heavy motor vehicles</TH>
<TH>15</TH>
<TH>35</TH>
<TH>60</TH>
</TR>
</TABLE>
</BODY>
</HTML>
�
6.AIM: Design a webpage containing frames that divide the screen vertically in the
ratio 50:50.Design two web pages –one containing the list of indian cricket team
members and the second containing a list of Indian football team members.
frame.html
<HTML>
<HEAD>
<TITLE>Team_List</TITLE>
</HEAD>
<FRAMESET Cols=50%,50%>
<FRAME SRC="Cricket.html">
<FRAME SRC="Football.html">
</FRAMESET>
</HTML>
Cricket.html
<HTML>
<HEAD>
<TITLE>Cricket Team</TITLE>
</HEAD>
<body>
<h2><u>Cricket Team</u><br>
Sachin Tendulkar<br>
Rahul Dravid<br>
Dhoni<br>
Sreeshanth<br>
Ganguly<br>
</HTML>
Football.html
<HTML>
<HEAD>
<TITLE>Football Team</TITLE>
</HEAD><body>
<h2><u>Football Team</u><br>
Lionel Messi<br>
Naimer<br>
Ronaldo<br>
Ronaldinho<br>
Maradonna<br>
</HTML>
�
�
�
�
7.Aim : Design a simple webpage as shown below:
<HTML>
<HEAD>
<TITLE>LOGIN</TITLE>
</HEAD>
<BODY>
<FORM>
<FIELDSET>
Client Login
<B R >
Enter User Name : <INPUT Type="Text"> <br>
<B R >
Enter Your Password <INPUT Type="Password">
<B R >
<INPUT Type="Submit" value="SUBMIT">
<INPUT Type="Reset" value="CLEAR">
</FIELDSET>
</FORM>
</BODY>
</HTML>
�
8.AIM: A webpage should contain one text box for entering a text.There should be two buttons
labelled “To Upper Case “ and “To Lower Case” .On clicking each button,the content in
the text box should be converted to upper case or lower case accordingly .Write the
required JavaScript for these operations
PROCEDURE
<HTML>
<HEAD>
<TITLE>String Convertion</TITLE>
<SCRIPT Language="JavaScript">
function upper()
{
var a,b;
a=document.frmconvert.text1.value;
b=a.toUpperCase();
document.frmconvert.text1.value=b;
}
function lower()
{
var a,b;
a=document.frmconvert.text1.value;
b=a.toLowerCase();
document.frmconvert.text1.value=b;
}
</SCRIPT>
</HEAD>
<BODY>
<FORM Name="frmconvert">
<CENTER>
Enter theString: <INPUT Type="text" Name="text1">
<BR><BR>
<INPUT Type="button" value="To Upper Case" onClick="upper()">
<INPUT Type="button" value="To Lower Case" onClick="lower()">
</CENTER>
</FORM>
</BODY>
</HTML>
�
�
9.Develop a webpage with two text boxes and a button labelled “Show”.The user can enter
a number in the first text box.On clicking the button,the second text box should display the
sum of all numbers up to the given number.Write the required JavaScript
<HTML>
<HEAD>
<TITLE>Sum</TITLE>
<SCRIPT Language="JavaScript">
function sum()
{
var sum=0,i,limit;
limit=Number(document.frmsum.txtlimit.value);
for(i=1;i<=limit;i++)
{
sum=sum+i;
}
document.frmsum.txtsum.value=sum;
}
</SCRIPT>
</HEAD>
<BODY>
<FORM Name="frmsum">
<CENTER>
Enter thelimit: <INPUT Type="text" Name="txtlimit"> <BR><BR>
Sum of numbers : <INPUT Type="text" name="txtsum">
< B R >< B R >
<INPUT Type="button" value="Sum" onClick="sum()">
</CENTER>
</FORM>
</BODY>
</HTML>
�
10. AIM : Develop a webpage to find the capital of Indian States.The page should contain a
dropdown list from which the user can select a state.On clicking the show button,the web
page should display the capital of the state in another text box.Write the required
JavaScript.
PROCEDURE
<HTML>
<HEAD>
<TITLE>Capital OfStates</TITLE>
<SCRIPT Language="JavaScript">
function Capital()
{
var n,answer;
n=document.frmCapital.cboState.selectedIndex;
switch(n)
{
case 0:
answer="Thiruvananthapuram";break;
case 1:
answer="Bengaluru";break;
case 2:
answer="Chennai";break;
case 3:
answer="Mumbai";break;
}
document.frmCapital.txtCapital.value=answer;
}
</SCRIPT>
</HEAD>
<FORM Name="frmCapital">
<CENTER>State:
<SELECT Name="cboState">
<OPTION>Kerala</OPTION>
<OPTION>Karnataka</OPTION>
<OPTION>Tamilnadu</OPTION>
<OPTION>Maharashtra</OPTION>
</SELECT>
< B R >< B R >
Capital:
<INPUT Type="Text" Name="txtCapital">
< B R >< B R >
<INPUT Type="Button" value="Show" onClick="Capital()">
</CENTER>
</FORM>
</BODY>
</HTML>
�
Or Qn: AIM: Design the following webpage about kerala tourism using List tags
PROCDURE
<HTML>
<HEAD> <TITLE> Kerala Tourism</TITLE> </HEAD>
<BODY>
<CENTER>
<H1> Department of Tourism </H1>
<H2> Kerala State </H2>
</CENTER>
<I><B> Tourist attractions in Kerela </I> </B><BR>
<OL>
<LI> Beaches
<OL Type="a">
<LI>Kovalam Beach
<LI>Muzhuppilngad
<LI>Kappad
</OL>
<LI> Hill Station
<OL type="i">
<LI>Munnar
<LI>Wayanad
<LI>Gavi
</OL>
<LI> Wild Life
<OL type="a">
<LI>Iravikulam
<LI>Muthanga
<LI>Kadalundi
</OL>
</UL>
</BODY></HTML>
�
�
1. Create a table Student with the following fields and insert at least 5
records into the table except for the column Total.
a. Update the column Total with the sum of Mark1, Mark2 and
Mark3.
b. List the details of students in Commerce batch.
c. Display the name and total marks of students who are failed (Total< 90).
d. Display the name and batch of those students who scored 90 or more in Mark1 and
Mark2.
e. Delete the student who scored below 30 in Mark3
PROCEDURE
PROCEDURE
create table stock(Item_code Integer Primary key,Item_name archar(20),Manufacturer_Code
Varchar(5),Qty Int,Unit_Price Decimal(10,2),Exp_Date Date);
4. Create a table Bank with the following fields and insert at least 5
records into the table.
PROCEDURE
PROCEDURES
Or
select bookname,price*10/100 from book order by bookname;
�
TCA GAFOOR
HSST Computer Application
9847995577