ICT Practical 2023
ICT Practical 2023
Class: XI - XII
Subject: Information and Communication Technology (Practical)
Practical:
1. Use of formatting tags in HTML
2. Use of paragraphs, headings, colors and formatting
3. Use of bullets and numbering lists on web pages
4. Adding images to web pages and using hyperlink
5. Creation of table and data entry in HTML
6. Use of frames in HTML
7. Input Output Statement
8. Conditional Statements
9. Loop Statement
10. array
11. Function
Labwork 01: Use of various text formatting tags in HTML Date : 6/11/2022
Required equipment: A personal computer.
Required software:
1. An operating system. e.g.- Windows7/Windows 8/Windows 10
2. Any editor program. e.g.- Notepad/Notepad++/Sublime Text
3. Any browser: Google Chrome/Mozila Firefox/Microsoft Edge
HTML- code
<!DOCTYPE html>
<html>
<body>
<p>This is normal text</p>
<p><small>This is small text</small> </p>
<p><b>This is bold text </b> </p>
<p> <strong>This is strong text</strong> </p>
<p> <u>This is underlined text </u> </p>
<p><ins> This is inserted text </ins> </p>
<p><i> This is italic text </i> </p>
<p><em> This is emphasized text </em> </p>
<p><del> This is deleteted text </del> </p>
<p><s> This is strike text </s> </p>
<p> <sub> This is subscript text </sub></p>
<p>This is <sup> superscript text </sup>text </p>
<pre>
This is a programme
for i = 5 + 0 100 step 5
print
next i
</pre>
</body>
</html>
Save file:
1. Write the code in the notepad and click on the Save/Save As option in the
file menu. Then the save as dialog box will appear.
2. Type any name in the text box of file Name and write .html or .html at the
end of the name.
3. Select HTML or HTML file from the Type drop down list.
4. Finally click on save. Then the file will be saved.
Result: To open the extracted file in any browser, place the mouse pointer on the
file and double click. Then we can see the output as shown in the next image.
Save file:
1. Write the code in the notepad and click on the Save/Save As option in the
file menu. Then the save as dialog box will appear.
2. Type any name in the text box of file Name and write .html or .html at the
end of the name.
3. Select HTML or HTML file from the Type drop down list.
4. Finally click on save. Then the file will be saved.
Result: To open the extracted file in any browser, place the mouse pointer on the
file and double click. Then we can see the output as shown in the next image.
HTML- code:
<!DOCTYPE html>
<html>
<body>
<h2> An ordered list: </h2>
<ol>
<li>Dhaka </li>
<li>Rajshahi </li>
<li>Chattogram </li>
<li>Khulna </li>
<li>Barishal </li>
<li>Rangpur </li>
<li>Sylhet </li>
<li>Mymensingh </li>
</ol>
<h2>An ordered list with attribute: </h2>
<ol start = "11">
<li>Barishal </li>
<li>Rangpur </li>
<li>Sylhet </li>
<li>Mymensingh </li>
</ol>
<h2>An unordered list </h2>
<ul type = "square">
<li>Dhaka </li>
<li>Rajshahi </li>
<li>Barishal </li>
<li>Mymensingh </li>
</ul>
</body>
</html>
Save file:
1. Write the code in the notepad and click on the Save/Save As option in the
file menu. Then the save as dialog box will appear.
2. Type any name in the text box of file Name and write .html or .html at the
end of the name.
3. Select HTML or HTML file from the Type drop down list.
4. Finally click on save. Then the file will be saved.
Result: To open the extracted file in any browser, place the mouse pointer on the
file and double click. Then we can see the output as shown in the next image.
Figure: Use of Bullets and Numbering Lists in Web Pages
Explanation:
<ol>-------- </ol> used for order list
<li>----------- </li> used to define what items will be in the order list
HTML- code:
<!DOCTYPE html>
<html>
<body>
<p>
An image:
<img src="rose.jpg" alt="Image of a Rose" width="300" height="300">
</p>
<p>
An image from picture folder in D drive:
<img src="D:\\picture\tulip.jpg" alt="Picture of Tulip" width="200"
height="200">
</p>
<p>
an hyperlinked image:
<a href="https://www.google.com">
<img src="google_logo.jpg" alt="Logo" width="200" height="200">
</a>
</p>
</body>
</html>
Save file:
1. Write the code in the notepad and click on the Save/Save As option in the
file menu. Then the save as dialog box will appear.
2. Type any name in the text box of file Name and write .html or .html at the
end of the name.
3. Select HTML or HTML file from the Type drop down list.
4. Finally click on save. Then the file will be saved.
Result: To open the extracted file in any browser, place the mouse pointer on the
file and double click. Then we can see the output as shown in the next image.
HTML- code:
<!DOCTYPE html>
<html>
<body>
<h2>Table with empty cells:</h2>
<table border= “1” width ="50%">
<Caption> Empty Table</Caption>
<tr><td> <td><td> <td></tr>
<tr><td> <td><td> <td></tr>
</table>
<h2>Table with headers:</h2>
<table border= “1” cellspacing= “0”>`
<Caption>Contract</Caption>
<tr><th>Name</th><th>Telephone :2</th></tr>
<tr><td>Amin Arman</td><td>555 77 854</td><td>555 77 855</td></tr>
</table>
<h2>Vertical headers:</h2>
<table border= “1”>
<Caption>Contact</Caption>
<tr><th>Name</th><td>Amin Arman</td></tr>
<tr><th>Telephone:1</th><td>555 77 854</td></tr>
<tr><th>Telephone:2</th><td>555 77 854</td></tr>
</table>
</table>
</body>
<html>
Save file:
1. Write the code in the notepad and click on the Save/Save As option in the
file menu. Then the save as dialog box will appear.
2. Type any name in the text box of file Name and write .html or .html at the
end of the name.
3. Select HTML or HTML file from the Type drop down list.
4. Finally click on save. Then the file will be saved.
Result: To open the extracted file in any browser, place the mouse pointer on the
file and double click. Then we can see the output as shown in the next image.
Figure: Table creation and data entry in HTML
Explanation: For table inserts, the tag ¨<table> </table> is used. To determine
how much the border of the table will be, BORDER = “1"attribute is used. There is
no space between the table border and the cell border due to the value of 0 in the 2nd
table.
• <caption> is used to display table titles. The <table> tag is used before the
table row tag (<tr>) immediately after the <caption> tag. If you want to write
a title, then you have to write the <table> tag after the <caption>tag.
• The <tr>...</tr> tag is used to create table rows.
• <tr> Data cells are separated by <td> tag after each row and again. td stands
for Table data which is the content of a data cell.
• <th> tag is used to give headings within the table.
•   is used for white space.
• h2 is used for heading
Labwork 06: Use of frames in HTML Date: 11/12/2022
Required equipment: A personal computer.
Required software:
1. An operating system. e.g.- Windows7/Windows 8/Windows 10
2. Any editor program. e.g.- Notepad/Notepad++/Sublime Text
3. Any browser: Google Chrome/Mozila Firefox/Microsoft Edge
HTML- code:
<!DOCTYPE html>
<html>
<frameset cols="*,*,*,*">
<frame src="lab work-2.html">
<frame src="lab work-3.html">
<lab work-5.html">
<frame src="lab work-4.html">
</frameset>
</html>
Save file:
1. Write the code in the notepad and click on the Save/Save As option in the
file menu. Then the save as dialog box will appear.
2. Type any name in the text box of file Name and write .html or .html at the
end of the name.
3. Select HTML or HTML file from the Type drop down list.
4. Finally click on save. Then the file will be saved.
Result: To open the extracted file in any browser, place the mouse pointer on the
file and double click. Then we can see the output as shown in the next image.
Program code:
#include <stdio.h>
int main()
{
char x;
int n;
float y;
printf ("Enter a number:");
scanf("%d", &n);
printf ("The number is = %d\n\n",n);
printf ("Enter a fraction number:");
scanf("%f", &y);
printf ("The number is = %f",y);
return 0;
}
Saving the program:
1. To save the file, click on the save/save as menu and click press CTRL+S
from the keyboard. Then the save file dialog box will appear.
2. Type any name in the name box of file name and add .c extension at the end
of the name.
3. Select c/c++ from the drop-down list of Eligibility.
4. Finally click on OK.
Program execution:
1. To compile, click on build menu or press ctrl+F9.
2. To run it, click on build manu or press ctrl+F10.
3. To compile and run together, click on Compile and Run from the
Compile menu or Press ctrl+F9.
Output : This program does not input a character, an integer, a decimal value. If
you run this program, you will see the result as shown in the image below.
Labwork 08: Program to find largest number out of three numbers using
conditional statement Date :08/1/2023
int main()
{
int a,b,c;
printf ("Enter 3 interger valuse:");
scanf("%d %d %d",&a,&b,&c);
if ((a>b) && (a>c))
printf ("Largest value is:%d \n", a);
else if ((b>a) && (b>c))
printf ("Largest value is:%d \n", b);
else
printf ("Largest value is:%d \n", c);
return 0;
}
Program execution:
1. To compile, click on build menu or press ctrl+F9.
2. To run it, click on build manu or press ctrl+F10.
3. To compile and run together, click on Compile and Run from the Compile menu
or Press ctrl+F9.
Result: Three numbers are not input in this program. Output will be different for
different types of input. If you run this program, you will see the result as shown in
the image.
Figure : Program to find largest number among three numbers using conditional
statement
Explanation: The program compares three numbers with the if-esle statement to
find the larger number. The 1st number is compared with the 2nd and 3rd numbers
to determine the larger number among the three numbers. If 1st number is greater
than 2nd and 3rd number then 1st number will be greater. Similarly 2nd number is
compared with 1st and 3rd number. If 2nd number is greater than 1st and 3rd
number then 2nd number will be greater. Otherwise the 3rd digit will be larger.
Labwork 09: Program to find sum of series 2+4+6....+n using loop
Dated : 15/01/2023
Required equipment: A personal computer.
Required software:
1. An operating system. e.g.- Windows7/Windows 8/Windows 10 and
2. An IDE with GNU GCC compiler. For example- Turbo C, Dev C, Code
blocks
Program code:
#include<stdio.h>
int main ( )
{
int n,sum= 0, i;
printef (“Enter a positive integer number:”)
scnaf(“% d & & n);
for (i = 2; i <=n; i=i+2)
{
sum = sum + i;
}
Printf ( “Result : %d\n, sum);
return 0 ;
}
Saving the program:
1. To save the file, click on the save/save as menu and click press ctrl+s from
the keyboard. Then the save file dialog box will appear.
2. Type any name in the name box of file name and add .c extension at the end
of the name.
3. Select c/c++ from the drop-down list of Eligibility.
4. Finally click on the OK.
Program execution:
1. To compile, click on build menu or press ctrl+F9.
2. To run it, click on build manu or press ctrl+F10.
3. To compile and run together, click on Compile and Run from the Compile
menu or Press ctrl+F9.
Result: A positive integer is not input. Output will be different for different types
of input. If you run this program, you will see the result as shown in the image
below.
Program code:
#include <stdio.h>
int main() {
int values[5];
Program execution:
1. To compile, click on build menu or press ctrl+F9.
2. To run it, click on build manu or press ctrl+F10.
3. To compile and run together, click on Compile and Run from the
Compile menu or Press ctrl+F9.
Result: Any three numbers are not input in this program. If you run this program,
you will see the result as shown in the image.
Figure : Program to put some numbers in an array and display the numbers
Explanation: The program uses the function stdio.h included in the library
functions. The line #include<stdio.h> should be placed as the first line of every
program. main() is a function. When the program is started to run, the main()
function is executed first. An array is a collection of data of a data type. The
program makrs declares a variable of type int which can hold up to 5 numbers.
The index of the array serves to separate each data. Array index starts from 0. The
first number will be in marks[0] the second in marks[1] and so on. If you want to
work with a specific variable of the array (display, arithmetic operation), you have
to use the name and index of the array variable.
int main() {
double number, squareRoot;
return 0;
}
Program execution:
1. To compile, click on build menu or press ctrl+F9.
2. To run it, click on build menu or press ctrl+F10.
3. To compile and run together, click on Compile and Run from the
Compile menu or Press ctrl+F9.
Result: No single decimal number is input in this program. Output will be
different for different types of input. Running this program will show results like
the image shown.
= Finished =