0% found this document useful (0 votes)
2 views26 pages

IT Computer Applications Lab Manual

The document is a practical laboratory manual covering IT and computer applications, including MS Office, Linux, Shell Scripting, C Programming, Web Development, SQL, and Git/GitHub. It outlines various experiments focused on creating professional documents, resumes, spreadsheets, and presentations, as well as using formulas, functions, and charts in Excel. Each experiment includes aims, theoretical background, procedures, and critical comments to enhance learning and application of the skills taught.

Uploaded by

pritamlaha17
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views26 pages

IT Computer Applications Lab Manual

The document is a practical laboratory manual covering IT and computer applications, including MS Office, Linux, Shell Scripting, C Programming, Web Development, SQL, and Git/GitHub. It outlines various experiments focused on creating professional documents, resumes, spreadsheets, and presentations, as well as using formulas, functions, and charts in Excel. Each experiment includes aims, theoretical background, procedures, and critical comments to enhance learning and application of the skills taught.

Uploaded by

pritamlaha17
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

IT / COMPUTER APPLICATIONS

PRACTICAL LABORATORY MANUAL

MS Office, Linux, Shell Scripting, C Programming, Web Development,


SQL, and Git/GitHub Version Control
Contents
● 1. Create Professional Documents using MS Word
● 2. Create Resumes and Reports in Word
● 3. Prepare Spreadsheets using MS Excel
● 4. Use Formulas and Functions in Excel
● 5. Create Charts and Graphs in Excel
● 6. Design Presentations using PowerPoint
● 7. Linux Basic Commands
● 8. File and Directory Management in Linux
● 9. Shell Scripting Basics
● 10. C Programming (Basic Programs)
● 11. HTML Webpage Creation
● 12. CSS Basics
● 13. SQL Database Creation
● 14. SQL Queries (SELECT, INSERT, UPDATE, DELETE)
● 15. Git Installation and GitHub Account Setup
● 16. Git Commands (init, add, commit, push, pull)
● 17. Upload a Project to GitHub
● 18. Basic Command-Line Operations
Experiment 1: Create Professional Documents using MS Word
1. Aim
To create a professional, well-formatted document in MS Word using headings, styles, page numbering, headers/footers,
tables, and a table of contents.

2. Theory
MS Word is a WYSIWYG (What You See Is What You Get) word processor used to create professional documents such as
letters, reports, and manuals. A professional document uses consistent formatting through built-in Styles (Heading 1, Heading
2, Normal) rather than manual font changes, which also allows an automatic Table of Contents to be generated (References
tab > Table of Contents). Page Layout options control margins, orientation, and page size, while the Insert tab provides
headers, footers, page numbers, tables, and images. Features like Find & Replace, Spelling & Grammar check, and Track
Changes/Comments (Review tab) help refine and collaborate on documents.

3. Steps / Procedure Table


Step Task Ribbon / Menu Used
1 Set page size and margins Layout > Size / Margins
2 Apply Heading 1 / Heading 2 styles to section titles Home > Styles
3 Insert a Table of Contents References > Table of Contents
4 Insert header with document title and footer with page Insert > Header & Footer
number
5 Insert a table for structured data Insert > Table
6 Check spelling and grammar Review > Spelling & Grammar
7 Save as .docx and export as PDF File > Save As / Export

4. Graph
Not applicable — this is a document-formatting exercise; no numerical graph is generated. A screenshot of the final
formatted document with visible headings, header/footer, and table of contents is attached in the practical file instead.

5. Calculation
Not applicable in the numerical sense. As a verification step, the document's word count and page count can be checked via
Review > Word Count, e.g., a sample 3-page report produced 612 words across 3 pages with 1-inch margins on A4 size.

6. Conclusion and Critical Comment


A professionally formatted Word document was created using consistent heading styles, an auto-generated table of contents,
headers/footers with page numbers, and a data table, demonstrating the core document-formatting features of MS Word.
Critical Comment: Using built-in Styles instead of manual formatting is critical, since it is what enables features like auto-
TOC, easy re-formatting (changing one style updates the whole document), and consistent professional appearance. Skipping
styles is one of the most common mistakes beginners make, resulting in documents that look inconsistent and are hard to
maintain.
Experiment 2: Create Resumes and Reports in Word
1. Aim
To design a resume (CV) and a formal report in MS Word using appropriate layout, formatting, and structural elements.

2. Theory
A resume is a concise, structured summary of a person's education, skills, and experience, typically organized under headings
such as Objective, Education, Skills, Projects, and Experience, often using a two-column layout (via a Table with invisible
borders or Text Boxes) for a compact, scannable design. A formal report, in contrast, is a longer structured document
typically including a Title Page, Abstract/Summary, Table of Contents, numbered sections (Introduction, Methodology,
Results, Conclusion), and References, often with page numbers and consistent heading styles throughout. Both document
types benefit from using Word's built-in resume/report templates (File > New > Templates) as a starting point, which can
then be customized.

3. Steps / Procedure Table


Step Resume Task Report Task
1 Add Name & contact details as header Add title page with course/author details
2 Create Objective/Summary section Add Abstract summarizing the report
3 List Education in reverse chronological order Insert auto Table of Contents
4 Add Skills using a bulleted or tabular layout Add numbered section headings (Intro, Body,
Conclusion)
5 Add Projects/Experience with bullet points Insert tables/figures with captions
6 Keep formatting to 1 page using a two-column Add References/Bibliography section
layout

4. Graph
Not applicable — this experiment is a document design exercise. A completed sample resume and sample report are attached
as printed/PDF outputs in the practical file.

5. Calculation
Not applicable numerically; as a design check, the resume was verified to fit within 1 page (recommended length) and the
report was verified to be 5-8 pages excluding the title page and TOC, in line with typical academic reporting guidelines.

6. Conclusion and Critical Comment


A one-page resume and a multi-section formal report were successfully created in MS Word, applying appropriate structure,
headings, and formatting suited to each document type.
Critical Comment: Resumes should prioritize clarity and brevity — recruiters typically scan a resume for a few seconds, so
excessive text, inconsistent fonts, or cluttered layouts reduce effectiveness. For reports, maintaining consistent heading levels
is essential, as an incorrectly nested heading (e.g., using Heading 3 style for a main section) will break the outline structure
and the auto-generated Table of Contents.
Experiment 3: Prepare Spreadsheets using MS Excel
1. Aim
To create a spreadsheet in MS Excel to organize, format, and manage tabular data.

2. Theory
MS Excel organizes data into a grid of rows and columns called a worksheet, with multiple worksheets grouped into a
workbook. Each intersection of a row and column is a cell, referenced by its column letter and row number (e.g., B3). Excel
supports data types such as text, numbers, dates, and currency, and provides formatting tools (cell borders, shading, number
formats, conditional formatting) to make data readable. Features like Freeze Panes (keep header rows visible while scrolling),
Sort & Filter (organize/extract data), and Data Validation (restrict allowed cell input, e.g., a drop-down list) are essential for
building a well-structured, usable spreadsheet.

3. Sample Spreadsheet Table (Student Marksheet)


Roll No. Name Maths Physics Chemistry Total Percentage
101 Aarav Sharma 85 78 90 253 84.33
102 Diya Patel 72 88 65 225 75
103 Rohan Gupta 90 92 88 270 90
104 Ishita Roy 60 55 70 185 61.67
105 Kabir Singh 78 80 82 240 80

4. Graph
A chart derived from this data is shown separately in the 'Charts and Graphs in Excel' experiment; refer to Experiment 5
below.

5. Calculation
Total for Roll No. 101 = 85+78+90 = 253 (using formula =SUM(C2:E2))
Percentage for Roll No. 101 = (Total/300) × 100 = (253/300) × 100 = 84.33% (using formula =(F2/300)*100)

6. Conclusion and Critical Comment


A structured spreadsheet was created with appropriate column headers, formatted numeric data, and calculated fields (Total,
Percentage), demonstrating basic spreadsheet organization in MS Excel.
Critical Comment: Keeping raw input data (marks) separate from calculated columns (total, percentage) using formulas —
rather than typing computed values manually — ensures the sheet updates automatically if any input changes, which is the
central advantage of a spreadsheet over a plain table. Freezing the header row (View > Freeze Panes) is recommended for
large sheets so column headers remain visible while scrolling.
Experiment 4: Use Formulas and Functions in Excel
1. Aim
To use common Excel formulas and built-in functions (SUM, AVERAGE, MAX, MIN, IF, COUNTIF, VLOOKUP) to
process tabular data.

2. Theory
A formula in Excel always begins with an '=' sign and can combine cell references, arithmetic operators, and functions to
compute a value automatically. Functions are pre-built formulas for common operations: SUM() adds a range of values,
AVERAGE() computes the mean, MAX()/MIN() find the largest/smallest value, and COUNTIF() counts cells meeting a
condition. The IF() function performs conditional logic, returning one value if a condition is true and another if false (e.g.,
Pass/Fail based on marks). VLOOKUP() (or the newer XLOOKUP()) searches for a value in the first column of a range and
returns a corresponding value from another column, which is essential for looking up related data across large tables.

3. Formula Table (applied to the marksheet data from Experiment 3)


Sl. No. Requirement Formula Used Result
1 Total marks of a student =SUM(C2:E2) 253
2 Class average in Maths =AVERAGE(C2:C6) 77
3 Highest total marks =MAX(F2:F6) 270
4 Lowest total marks =MIN(F2:F6) 185
5 Pass/Fail status (pass mark 40 per =IF(AND(C2>=40,D2>=40,E2>=40),"Pass","Fail" Pass
subject) )
6 Count of students scoring above =COUNTIF(G2:G6,">80") 2
80%
7 Lookup a student's name by roll =VLOOKUP(103,A2:B6,2,FALSE) Rohan Gupta
number

4. Graph
Not applicable directly to this experiment (formulas produce single values/tables, not charts); see Experiment 5 for chart
creation from computed data.

5. Calculation
Verification of AVERAGE formula: Maths marks = 85, 72, 90, 60, 78. Sum = 385; Average = 385/5 = 77, matching the
Excel AVERAGE() output.
Verification of COUNTIF: Percentages = 84.33, 75.00, 90.00, 61.67, 80.00. Values strictly greater than 80 are 84.33 and
90.00 → count = 2, matching the Excel output.

6. Conclusion and Critical Comment


Various Excel formulas and functions (SUM, AVERAGE, MAX, MIN, IF, COUNTIF, VLOOKUP) were applied
successfully to the sample dataset, and manual verification confirmed that Excel's computed results matched the expected
values.
Critical Comment: Absolute cell referencing (using $ signs, e.g., $C$2) is important when copying a formula across multiple
cells that must always refer to a fixed cell/range (such as a fixed lookup table), whereas relative referencing (default, e.g., C2)
is appropriate when the reference should shift automatically as the formula is copied down or across. A common beginner
error is forgetting to lock the lookup range in VLOOKUP, which breaks the formula when copied down a column.
Experiment 5: Create Charts and Graphs in Excel
1. Aim
To represent tabular data visually in MS Excel using bar charts, pie charts, and line charts.

2. Theory
Charts convert numeric data into a visual format that is easier to interpret than raw numbers, and are inserted via the Insert >
Charts group in Excel after selecting the relevant data range. A Column/Bar chart is best for comparing discrete categories
(e.g., sales across quarters). A Pie chart shows the proportion of each category relative to a whole (e.g., percentage share of
expenses) and works best with a small number of categories. A Line chart is ideal for showing a trend over a continuous
variable such as time (e.g., marks across several tests). Excel also allows customization of chart titles, axis labels, legends,
and data labels via the Chart Design and Format tabs, or the 'Chart Elements' (+) button.

3. Sample Data Tables


Quarter Sales (Rs.)
Q1 45000
Q2 52000
Q3 48000
Q4 61000
Expense Category Share (%)
Rent 35
Salaries 30
Marketing 15
Utilities 10
Misc 10

4. Graph
The bar chart below compares quarterly sales, the pie chart shows monthly expense distribution, and the line chart shows a
student's performance trend across five tests — all generated from the sample data using Excel's chart tools.
5. Calculation
Total annual sales = 45000+52000+48000+61000 = Rs. 2,06,000; Q4 contributes (61000/206000)×100 ≈ 29.6% of the
annual total, the largest share among the four quarters, visually confirmed by the tallest bar in the chart.
Expense pie chart check: sum of percentages = 35+30+15+10+10 = 100%, confirming the pie chart correctly represents the
whole.

6. Conclusion and Critical Comment


Bar, pie, and line charts were successfully created in Excel from sample datasets, correctly visualizing category comparison,
proportional share, and trend-over-time respectively.
Critical Comment: Choosing the wrong chart type for the data can mislead the viewer — for example, using a pie chart for
data that does not sum to a meaningful whole, or using a line chart for unrelated (non-sequential) categories, is a common
mistake. Excessive 3-D effects or too many data series in one chart should be avoided as they reduce readability rather than
adding value.
Experiment 6: Design Presentations using PowerPoint
1. Aim
To design a multi-slide presentation in MS PowerPoint using slide layouts, themes, transitions, and multimedia elements.

2. Theory
MS PowerPoint is used to create slide-based presentations for communicating ideas visually. Each slide uses a Layout (Title
Slide, Title & Content, Two Content, etc.) that defines placeholder positions for text, images, and other objects. A Theme
applies a consistent color scheme, font set, and background design across all slides, which can be changed globally via the
Design tab. Slide Transitions (Transitions tab) control how one slide changes to the next, while Animations (Animations tab)
control how individual objects appear/move within a slide. Best practice limits each slide to one main idea with minimal text,
relying on visuals (images, charts, SmartArt) and the presenter's spoken explanation to convey detail, rather than dense
paragraphs of text (avoiding 'reading off the slide').

3. Slide Plan Table (Sample 6-slide presentation)


Slide No. Slide Title Content Type
1 Title Slide Presentation title, author name, date
2 Introduction / Agenda Bulleted list of topics to be covered
3 Problem Statement Text + relevant image
4 Proposed Solution / Approach SmartArt diagram / flowchart
5 Results / Data Embedded Excel chart
6 Conclusion / Thank You Summary bullets + contact info

4. Graph
Not applicable as a standalone numeric graph — this experiment concerns slide design; a chart may be embedded within a
slide (e.g., the bar/pie/line charts produced in Experiment 5) as one of the content elements.

5. Calculation
Not applicable numerically. As a design check: total presentation duration was estimated by allowing ~1-2 minutes per slide
→ 6 slides × 1.5 minutes/slide ≈ 9 minutes, an appropriate length for a short seminar talk.

6. Conclusion and Critical Comment


A 6-slide presentation was designed using a consistent theme, appropriate slide layouts, and a mix of text, image, and chart
content, following good presentation-design practices.
Critical Comment: Overloading slides with text ('death by bullet points') is the most common presentation design flaw; the
6x6 rule (no more than 6 bullet points per slide, 6 words per bullet, as a rough guideline) is often recommended to keep slides
readable at a glance. Excessive or distracting slide transitions/animations should also be avoided as they can detract from,
rather than support, the message being communicated.
Experiment 7: Linux Basic Commands
1. Aim
To study and execute basic Linux commands for navigating the file system, viewing system information, and managing
processes.

2. Theory
Linux is a Unix-like, open-source operating system operated primarily through a command-line shell (such as bash), where
the user types text commands rather than clicking on icons. The file system is organized as a single hierarchical tree rooted at
'/', under which standard directories exist (e.g., /home for user files, /etc for configuration, /bin for essential binaries). Basic
commands allow navigation (pwd, cd, ls), viewing system/user information (whoami, date, uname), and process management
(ps, top). Commands are case-sensitive and are often combined with options (flags, e.g., -l, -a) to modify their behaviour, and
can be combined using pipes (|) to pass the output of one command as input to another.

3. Command Table
Sl. No. Command Purpose Sample Output
1 pwd Print current working directory /home/student
2 ls -l List files with details (permissions, size, -rw-r--r-- 1 student student 220
date) Jul 20 [Link]
3 whoami Display current logged-in username student
4 date Display current system date and time Sun Jul 26 10:15:32 IST 2026
5 uname -a Display kernel/OS information Linux ubuntu 6.8.0 x86_64
GNU/Linux
6 ps -ef List all running processes root 1 0 0 Jul25 ? 00:00:02
/sbin/init
7 top Show live system resource usage (CPU, (interactive display, updates every
memory) 3s)
8 man ls Show manual/help page for a command (opens manual page for 'ls')

4. Graph
Not applicable — command execution produces text output in the terminal rather than a plotted graph.

5. Calculation
Not applicable numerically; as a verification exercise, the output of 'ls -l' was cross-checked against the 'ls -l | wc -l'
command, which counted 15 lines (14 files + 1 'total' header line) confirming 14 files present in the sample directory.

6. Conclusion and Critical Comment


Basic Linux commands for navigation, system information, and process viewing were executed successfully, and their
outputs were verified to correctly reflect the system state.
Critical Comment: Linux commands are case-sensitive (e.g., 'LS' will fail while 'ls' works), which is a frequent source of
errors for beginners transitioning from Windows. Using 'man <command>' or '<command> --help' is the recommended first
step whenever the exact options for a command are forgotten, rather than guessing flags, since incorrect flags on system-
altering commands (like rm or chmod) can have destructive consequences.
Experiment 8: File and Directory Management in Linux
1. Aim
To create, copy, move, rename, and delete files and directories in Linux, and to manage file permissions.

2. Theory
Linux provides a set of commands to manage files and directories: mkdir creates a new directory, touch creates an empty file
(or updates its timestamp), cp copies files/directories, mv moves or renames files/directories, and rm removes files (rm -r
removes directories recursively). Every file/directory has an associated set of permissions for three categories of users —
owner, group, and others — each with read (r), write (w), and execute (x) permissions, viewable via 'ls -l' and modifiable
using chmod (numeric mode, e.g., chmod 755 file, or symbolic mode, e.g., chmod u+x file). Ownership can be changed using
chown. Understanding this permission model (rwxrwxrwx = owner/group/others) is fundamental to Linux system
administration and security.

3. Command Table
Sl. No. Command Purpose
1 mkdir project Create a new directory named 'project'
2 touch project/[Link] Create an empty file inside the directory
3 cp [Link] notes_backup.txt Copy a file to create a backup
4 mv notes_backup.txt archive/ Move the copied file into another directory
5 mv [Link] final_notes.txt Rename a file
6 rm -r project Recursively delete a directory and its contents
7 chmod 755 [Link] Set rwx for owner, r-x for group and others
8 chown student:student [Link] Change owner and group of a file

4. Graph
Not applicable — this is a file-system operation exercise.

5. Calculation
Permission calculation: chmod 755 corresponds to binary/octal breakdown — Owner: rwx = 4+2+1 = 7; Group: r-x = 4+0+1
= 5; Others: r-x = 4+0+1 = 5, giving the combined mode 755, matching the command used.

6. Conclusion and Critical Comment


Files and directories were successfully created, copied, moved, renamed, and deleted, and file permissions were correctly set
and verified using 'ls -l', confirming an understanding of Linux file management and the permission model.
Critical Comment: The 'rm -r' command deletes permanently without moving files to a recycle bin, so it should always be
used with caution (the -i flag can be added for a confirmation prompt before each deletion). Setting overly permissive
permissions (e.g., chmod 777, giving full access to everyone) on sensitive files is a common security mistake and should be
avoided in favour of the minimum permissions necessary for the task.
Experiment 9: Shell Scripting Basics
1. Aim
To write and execute a basic shell script that uses variables, conditional statements, and loops to automate a repetitive task.

2. Theory
A shell script is a text file containing a sequence of Linux commands, executed by a shell interpreter (commonly bash), that
automates tasks which would otherwise require typing commands manually one by one. A script begins with a shebang line
(#!/bin/bash) specifying the interpreter, and must be given execute permission (chmod +x [Link]) before it can be run
(./[Link]). Shell scripts support variables (assigned without spaces around '=', e.g., name="value", and read using $name),
conditional statements (if...then...elif...else...fi) for decision-making, and loops (for, while) for repeating a block of
commands. Command-line arguments passed to a script are accessed as $1, $2, etc., and $# gives the argument count.

3. Sample Script and Test Table


#!/bin/bash
# script: even_odd.sh - checks whether a number is even or odd
read -p "Enter a number: " num
if [ $((num % 2)) -eq 0 ]
then
echo "$num is Even"
else
echo "$num is Odd"
fi
Sl. No. Input (num) Expected Output Actual Output
1 10 10 is Even 10 is Even
2 7 7 is Odd 7 is Odd
3 0 0 is Even 0 is Even
4 -4 -4 is Even -4 is Even

4. Graph
Not applicable — shell script execution produces terminal text output rather than a graph.

5. Calculation
Verification: for num = 7, num % 2 (modulus/remainder operator) = 7 mod 2 = 1 (non-zero), so the condition [ $((num % 2))
-eq 0 ] is false, and the script correctly prints '7 is Odd', matching the observation table.

6. Conclusion and Critical Comment


A shell script using a variable, conditional statement, and the modulus operator was written and tested successfully for
multiple inputs, correctly identifying even and odd numbers in each case, verifying basic shell scripting concepts.
Critical Comment: Spacing is critical in bash syntax — for example, 'var = value' (with spaces) is interpreted as a command
named 'var' with arguments, not an assignment, whereas 'var=value' (no spaces) is correct; this is a very common beginner
error. Scripts intended for wider portability should be tested with 'sh' as well as 'bash', since some bash-specific syntax (like $
(( )) arithmetic or [[ ]] extended tests) may not work identically in all POSIX shells.
Experiment 10: C Programming (Basic Programs)
1. Aim
To write, compile, and execute basic C programs, including a program to check if a number is prime and a program to find
the factorial of a number.

2. Theory
C is a general-purpose, procedural, compiled programming language. A C program's execution always begins from the
main() function, and it typically includes header files (e.g., #include <stdio.h> for input/output functions like printf and
scanf). Variables must be declared with a data type (int, float, char, etc.) before use. Control structures include conditional
statements (if-else, switch) and loops (for, while, do-while) for repeated execution. A C program is compiled into an
executable using a compiler (e.g., gcc program.c -o program), which translates the human-readable source code into machine
code, and is then run as a separate step (./program).

3. Sample Programs and Test Table


(a) Program to check whether a number is Prime:
#include <stdio.h>
int main() {
int n, i, isPrime = 1;
printf("Enter a number: ");
scanf("%d", &n);
if (n <= 1) isPrime = 0;
for (i = 2; i <= n/2; i++) {
if (n % i == 0) { isPrime = 0; break; }
}
if (isPrime) printf("%d is Prime\n", n);
else printf("%d is Not Prime\n", n);
return 0;
}
(b) Program to find Factorial of a number:
#include <stdio.h>
int main() {
int n, i;
long fact = 1;
printf("Enter a number: ");
scanf("%d", &n);
for (i = 1; i <= n; i++) fact = fact * i;
printf("Factorial of %d = %ld\n", n, fact);
return 0;
}
Sl. No. Program Input Output
1 Prime check 7 7 is Prime
2 Prime check 12 12 is Not Prime
3 Factorial 5 Factorial of 5 = 120
4 Factorial 0 Factorial of 0 = 1

4. Graph
Not applicable — these are computational/logic programs producing text output, not graphical data.

5. Calculation
Manual verification of factorial: 5! = 5×4×3×2×1 = 120, matching program output. Manual verification of prime check for
n=12: 12 is divisible by 2 (12/2=6, remainder 0), so isPrime is correctly set to 0, and the loop breaks — confirming '12 is Not
Prime' is the correct output.

6. Conclusion and Critical Comment


Both C programs were successfully compiled using gcc and executed for multiple test inputs, producing outputs that were
manually verified to be mathematically correct.
Critical Comment: The prime-checking loop was optimized to run only up to n/2 (rather than n) for efficiency, since no factor
of n can exceed n/2 (other than n itself); a further common optimization is to loop only up to sqrt(n). Using 'long' instead of
'int' for the factorial variable is important because factorial values grow extremely fast (e.g., 13! already exceeds the range of
a 32-bit int), so choosing an insufficient data type is a common source of silent overflow errors in C.
Experiment 11: HTML Webpage Creation
1. Aim
To create a basic static webpage using HTML with headings, paragraphs, images, links, lists, and a table.

2. Theory
HTML (HyperText Markup Language) is the standard markup language used to structure content on the web. An HTML
document is composed of nested elements represented by tags (most requiring an opening <tag> and closing </tag>),
organized within a root <html> element containing a <head> (metadata, title, linked stylesheets) and a <body> (visible page
content). Common tags include heading tags <h1> to <h6>, paragraph <p>, hyperlink <a href="...">, image <img src="...">,
ordered/unordered lists (<ol>/<ul> with <li> items), and tables (<table>, <tr>, <td>). Semantic HTML5 tags such as
<header>, <nav>, <section>, and <footer> further describe the meaning/structure of content, which improves accessibility
and SEO compared to using generic <div> tags everywhere.

3. Sample Code and Element Table


<!DOCTYPE html>
<html>
<head>
<title>My First Webpage</title>
<link rel="stylesheet" href="[Link]">
</head>
<body>
<h1>Welcome to My Webpage</h1>
<p>This is a sample paragraph describing the page.</p>
<img src="[Link]" alt="Sample Image" width="200">
<a href="[Link] Example Site</a>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ul>
<table border="1">
<tr><th>Subject</th><th>Marks</th></tr>
<tr><td>Maths</td><td>85</td></tr>
</table>
</body>
</html>
Sl. No. Tag Purpose
1 <h1> to <h6> Define headings of decreasing importance/size
2 <p> Define a paragraph of text
3 <a href> Create a hyperlink to another page/resource
4 <img src> Embed an image
5 <ul>/<ol>/<li> Create unordered/ordered lists
6 <table>/<tr>/<td> Create a tabular data structure

4. Graph
Not applicable — the output is a rendered webpage layout, viewable by opening the .html file in a browser, rather than a
numeric graph.

5. Calculation
Not applicable numerically. As a structural check, the HTML file was validated to have matching opening/closing tags for all
11 elements used (verified using the W3C Markup Validator), confirming zero syntax errors in the document.

6. Conclusion and Critical Comment


A basic static webpage was created using core HTML tags for text, links, images, lists, and tables, and rendered correctly in a
web browser, confirming an understanding of HTML document structure.
Critical Comment: Forgetting to close tags (e.g., missing </table> or unclosed <li> items) is one of the most common HTML
errors; while browsers are often forgiving and attempt to auto-correct such mistakes, this can lead to unpredictable rendering,
so validating HTML is good practice. Always specifying the 'alt' attribute for images is important for accessibility (screen
readers) and is shown as fallback text if the image fails to load.
Experiment 12: CSS Basics
1. Aim
To style the previously created HTML webpage using CSS, applying selectors, the box model, colors, fonts, and a basic
responsive layout.

2. Theory
CSS (Cascading Style Sheets) is used to control the visual presentation of HTML content, separating structure (HTML) from
style (CSS). CSS rules consist of a selector (which HTML element(s) to style) and a declaration block of property:value pairs
(e.g., color: blue;). CSS can be applied inline (style attribute), internally (<style> tag in <head>), or externally (a linked .css
file, the recommended approach for maintainability). Every HTML element is treated as a box under the CSS Box Model,
consisting of content, padding, border, and margin (from innermost to outermost). Selectors can target elements by tag name,
class (.classname, reusable across elements), or id (#idname, unique to one element). Modern layout techniques like Flexbox
(display: flex) and CSS Grid (display: grid) are used to arrange elements responsively across different screen sizes, often
combined with media queries (@media) for responsive design.

3. Sample Code and Property Table


body {
font-family: Arial, sans-serif;
background-color: #f1f5f9;
margin: 0;
padding: 20px;
}
h1 {
color: #2563eb;
text-align: center;
}
.container {
display: flex;
justify-content: space-between;
border: 1px solid #ccc;
padding: 15px;
}
@media (max-width: 600px) {
.container { flex-direction: column; }
}
Sl. No. CSS Property Purpose
1 color / background-color Set text color / background color
2 font-family / font-size Control typography
3 margin / padding Control spacing outside/inside the box model
4 border Add a border around an element
5 display: flex Arrange child elements in a flexible row/column layout
6 @media Apply different styles based on screen width (responsive design)

4. Graph
Not applicable — the result is a visually styled webpage rendered in the browser rather than a numeric graph.

5. Calculation
Box model calculation: for a <div> with width: 200px, padding: 15px, border: 1px, margin: 10px — total rendered width =
content(200) + padding(15×2) + border(1×2) + margin(10×2) = 200+30+2+20 = 252px, verified using the browser's
Developer Tools (Inspect Element) box-model view.
6. Conclusion and Critical Comment
The HTML webpage was successfully styled using external CSS, applying colors, fonts, spacing, and a Flexbox-based layout
that adjusts using a media query for smaller screens, demonstrating core CSS concepts.
Critical Comment: Understanding the Box Model is essential, since unexpected element sizes are one of the most common
CSS debugging issues; adding 'box-sizing: border-box;' (which includes padding and border within the specified width,
instead of adding to it) is a widely used fix that simplifies layout calculations. Relying only on fixed pixel widths without
media queries results in a non-responsive design that may break or overflow on mobile screens.
Experiment 13: SQL Database Creation
1. Aim
To create a database and a table in SQL, defining appropriate columns, data types, and constraints.

2. Theory
SQL (Structured Query Language) is used to create, manage, and query relational databases, which organize data into tables
(relations) composed of rows (records) and columns (fields/attributes). A database is created using CREATE DATABASE,
and within it, tables are created using CREATE TABLE, specifying each column's name and data type (e.g., INT,
VARCHAR(n), DATE, DECIMAL). Constraints enforce data integrity rules: PRIMARY KEY uniquely identifies each row
and disallows NULLs, NOT NULL disallows missing values, UNIQUE disallows duplicate values, and FOREIGN KEY
enforces a valid reference to a primary key in another table (establishing relationships between tables). Choosing appropriate
data types and constraints at the design stage is essential to prevent invalid or inconsistent data from entering the database.

3. Schema Table and Sample SQL


CREATE DATABASE college_db;
USE college_db;

CREATE TABLE students (


roll_no INT PRIMARY KEY,
name VARCHAR(50) NOT NULL,
branch VARCHAR(30),
dob DATE,
email VARCHAR(50) UNIQUE
);
Column Name Data Type Constraint
roll_no INT PRIMARY KEY
name VARCHAR(50) NOT NULL
branch VARCHAR(30) -
dob DATE -
email VARCHAR(50) UNIQUE

4. Graph
Not applicable — a database schema is a structural/tabular design, not a plotted graph. An Entity-Relationship (ER) diagram
may instead be drawn separately to represent the table structure and relationships visually.

5. Calculation
Not applicable numerically. As a structural verification, the DESCRIBE students; command was run after creation,
confirming all 5 defined columns, their data types, and constraint flags (PRI for roll_no, UNI for email) matched the intended
design exactly.

6. Conclusion and Critical Comment


A database and a table with appropriate column data types and constraints (PRIMARY KEY, NOT NULL, UNIQUE) were
successfully created and verified, demonstrating fundamental relational database design.
Critical Comment: Choosing an appropriate PRIMARY KEY is a critical design decision — using a natural but potentially
non-unique field (e.g., name) as the primary key is a common design flaw; a dedicated unique identifier (like roll_no or an
auto-incrementing id) should be used instead. Under-sizing a VARCHAR column (e.g., VARCHAR(10) for names) can
cause data truncation errors later, so column sizes should be chosen with realistic headroom during the design phase.
Experiment 14: SQL Queries (SELECT, INSERT, UPDATE, DELETE)
1. Aim
To perform basic data manipulation on the 'students' table using SQL's SELECT, INSERT, UPDATE, and DELETE
statements.

2. Theory
These four statements form the core of SQL's Data Manipulation Language (DML). INSERT INTO adds new rows of data
into a table. SELECT retrieves data from one or more tables, optionally filtered using a WHERE clause, sorted using
ORDER BY, and can select specific columns or all columns (SELECT *). UPDATE modifies existing rows, again typically
restricted using a WHERE clause to avoid unintentionally updating every row in the table. DELETE removes rows matching
a given condition (again via WHERE); omitting the WHERE clause in an UPDATE or DELETE statement affects every row
in the table, which is a critical and common mistake to avoid. These operations, together with CREATE/ALTER/DROP
(DDL, covered in the previous experiment), form the foundation of relational database interaction.

3. Sample Queries and Result Table


INSERT INTO students VALUES (1,'Aarav Sharma','CSE','2004-05-12','aarav@[Link]');
INSERT INTO students VALUES (2,'Diya Patel','ECE','2004-08-21','diya@[Link]');
INSERT INTO students VALUES (3,'Rohan Gupta','CSE','2003-11-02','rohan@[Link]');

SELECT * FROM students WHERE branch = 'CSE';

UPDATE students SET branch = 'AIML' WHERE roll_no = 1;

DELETE FROM students WHERE roll_no = 2;


Sl. No. Query Effect / Result
1 INSERT (3 rows) 3 records added to the students table
2 SELECT * WHERE branch='CSE' Returns rows for roll_no 1 and 3 (2 rows)
3 UPDATE branch WHERE roll_no=1 roll_no 1's branch changed from CSE to AIML (1
row affected)
4 DELETE WHERE roll_no=2 Diya Patel's record removed (1 row affected); table
now has 2 rows

4. Graph
Not applicable — query results are tabular record sets rather than numeric graphs.

5. Calculation
Row count verification: after the sequence of operations above — 3 rows inserted, 0 rows added/removed by SELECT and
UPDATE, 1 row removed by DELETE — final row count = 3 - 1 = 2, which was confirmed by running SELECT COUNT(*)
FROM students; returning 2.

6. Conclusion and Critical Comment


The four fundamental SQL DML operations (INSERT, SELECT, UPDATE, DELETE) were executed successfully on the
students table, and the resulting data was verified at each step to match the expected outcome.
Critical Comment: Running UPDATE or DELETE without a WHERE clause is one of the most dangerous mistakes in SQL,
as it silently modifies/deletes every row in the table; it is good practice to first run the equivalent SELECT with the same
WHERE condition to preview affected rows before executing the UPDATE/DELETE. In production systems, such
destructive operations are often wrapped in a transaction (BEGIN...COMMIT/ROLLBACK) so that mistakes can be undone
before being permanently committed.
Experiment 15: Git Installation and GitHub Account Setup
1. Aim
To install Git on a local machine, configure it with user identity, and create a GitHub account for remote repository hosting.

2. Theory
Git is a distributed version control system (VCS) that tracks changes to files over time, allowing multiple versions of a
project to be recorded, compared, and reverted if necessary, and allowing multiple people to collaborate without overwriting
each other's work. Being 'distributed' means every collaborator has a full copy of the project's history on their own machine
(unlike older centralized VCS tools). GitHub is a cloud-based hosting service for Git repositories, providing a remote
location to store and share code, along with collaboration features such as pull requests, issues, and project boards. After
installing Git locally, the user identity (name and email) must be configured, as this information is attached to every commit
made, and a GitHub account provides the remote counterpart needed to push/pull code between the local machine and the
cloud.

3. Setup Steps Table


Step Task Command / Action
1 Install Git (Linux) sudo apt install git
2 Verify installation git --version
3 Set global username git config --global [Link] "Your Name"
4 Set global email git config --global [Link] "you@[Link]"
5 Create GitHub account Sign up at [Link] with email, username, password
6 Generate SSH key (for secure push/pull) ssh-keygen -t ed25519 -C "you@[Link]"
7 Add SSH public key to GitHub GitHub > Settings > SSH and GPG keys > New SSH key

4. Graph
Not applicable — this experiment involves installation and account configuration, not numerical/graphical data.

5. Calculation
Not applicable numerically. As a verification step, 'git config --list' was run after configuration, confirming [Link] and
[Link] were correctly set, and 'ssh -T git@[Link]' returned a successful authentication message confirming the SSH
key was correctly linked to the GitHub account.

6. Conclusion and Critical Comment


Git was successfully installed and configured with a global username and email, and a GitHub account was created and
linked via SSH key authentication, completing the prerequisite setup for version-controlled, remote-hosted project work.
Critical Comment: The email used in 'git config --global [Link]' should generally match (or be added to) the GitHub
account's registered emails, otherwise commits may not be correctly attributed to the GitHub profile in the contribution
graph. Using SSH keys (or a Personal Access Token) instead of a plain password is now required by GitHub for command-
line authentication, since GitHub deprecated password-based authentication for Git operations in 2021 for security reasons.
Experiment 16: Git Commands (init, add, commit, push, pull)
1. Aim
To use core Git commands to initialize a repository, stage and commit changes locally, and synchronize with a remote
repository.

2. Theory
Git tracks a project through a three-stage workflow: the Working Directory (files currently being edited), the Staging
Area/Index (a holding area for changes selected to be included in the next commit), and the Repository (the committed
history). git init creates a new, empty Git repository in the current folder. git add <file> (or git add .) moves changes from the
working directory into the staging area. git commit -m "message" permanently records the staged changes into the
repository's history with a descriptive message. git push uploads local commits to a remote repository (e.g., on GitHub),
while git pull downloads and merges changes from the remote repository into the local one. git status and git log are
frequently used alongside these to check the current state and view commit history respectively.

3. Command Sequence Table


Sl. No. Command Effect
1 git init Initializes a new local Git repository (creates a .git
folder)
2 git status Shows untracked/modified files and staging status
3 git add [Link] Stages the file '[Link]' for the next commit
4 git commit -m "Initial commit" Records the staged changes into the repository
history
5 git remote add origin <url> Links the local repository to a remote GitHub
repository
6 git push -u origin main Uploads local commits to the 'main' branch on
GitHub
7 git pull origin main Fetches and merges any new remote changes into the
local repository
8 git log --oneline Displays a condensed commit history

4. Graph
Not applicable directly, though GitHub's web interface does display a 'commit graph'/network graph visually showing branch
and commit history over time, which can be viewed under the repository's 'Insights > Network' tab.

5. Calculation
Verification: after 3 separate commits (Initial commit, Added CSS, Fixed navbar bug), 'git log --oneline' displayed exactly 3
lines (one per commit hash), confirming that each 'git commit' call created exactly one new history entry, and 'git rev-list --
count HEAD' returned 3, matching this count.

6. Conclusion and Critical Comment


The core Git workflow (init, add, commit, push, pull) was carried out successfully, with changes staged and committed
locally and then correctly synchronized with a remote GitHub repository, confirming the fundamentals of Git version control.
Critical Comment: Writing clear, descriptive commit messages (rather than vague messages like 'update' or 'fix') is essential
for a usable project history, especially in team environments where others must understand the purpose of each change.
Running 'git pull' before starting new work (and before pushing) helps avoid merge conflicts, which occur when the local and
remote branches have diverging changes to the same lines of a file — a situation that must be manually resolved if it arises.
Experiment 17: Upload a Project to GitHub
1. Aim
To take a locally created project (e.g., the HTML/CSS webpage from Experiments 11-12) and upload it to a new repository
on GitHub.

2. Theory
Uploading (pushing) an existing local project to GitHub involves first creating an empty repository on GitHub (without a
README, to avoid conflicting initial history), then linking the local project folder to this remote repository as its 'origin',
and finally pushing the local commit history to it. A .gitignore file is typically added to the project root to list files/folders
that should not be tracked by Git (e.g., temporary files, build artifacts, credentials), preventing them from being accidentally
uploaded. Once uploaded, the project becomes accessible via its GitHub URL, and GitHub Pages can optionally be enabled
(Settings > Pages) to host a static HTML/CSS website directly from the repository, free of charge.

3. Steps Table
Step Task Command / Action
1 Create a new empty repository on GitHub [Link] > New repository > (do not initialize
with README)
2 Navigate to local project folder cd my-webpage-project
3 Initialize Git in the project (if not already done) git init
4 Create a .gitignore file (optional) echo "*.log" > .gitignore
5 Stage all project files git add .
6 Commit the project git commit -m "Initial upload of webpage
project"
7 Link to the GitHub remote repository git remote add origin
[Link]
[Link]
8 Push to GitHub git branch -M main && git push -u origin main
9 (Optional) Enable GitHub Pages Settings > Pages > select 'main' branch > Save

4. Graph
Not applicable — the outcome is a hosted code repository, verified by browsing the repository's file listing on GitHub rather
than a plotted graph.

5. Calculation
Verification: the local project folder contained 4 files ([Link], [Link], [Link], .gitignore); after push, the GitHub
repository's file listing was confirmed to show all 4 uploaded files, and 'git status' returned 'nothing to commit, working tree
clean', confirming a complete and successful upload with no missed files.

6. Conclusion and Critical Comment


The local HTML/CSS project was successfully uploaded to a new GitHub repository, with all project files correctly staged,
committed, and pushed, and verified to be present in the remote repository.
Critical Comment: Accidentally committing sensitive files (passwords, API keys, database credentials) to a public GitHub
repository is a serious and common security mistake; a .gitignore file should always be set up before the first commit to
prevent this, since removing a file from Git history after it has been pushed is significantly more difficult than simply not
committing it in the first place. Choosing a public vs. private repository visibility setting appropriately, based on whether the
project is meant to be shared openly, is another important consideration at creation time.
Experiment 18: Basic Command-Line Operations
1. Aim
To perform basic command-line operations including text searching, redirection, piping, and combining multiple commands
for common tasks.

2. Theory
Beyond individual commands, the command-line shell provides powerful mechanisms to combine and control commands.
Redirection uses '>' to send a command's output to a file (overwriting it) and '>>' to append to a file instead. Piping ('|') sends
the output of one command directly as input to another, allowing complex operations to be built from simple commands (e.g.,
listing files and then filtering the list). grep searches text for lines matching a pattern, and is very commonly used with pipes
to filter output. wc counts lines, words, and characters in text, often used to quickly get a count of results. Wildcards (e.g.,
*.txt to match all text files) allow commands to operate on multiple files matching a pattern at once. Together, these tools
embody the Unix philosophy of building complex functionality by combining small, single-purpose commands.

3. Command Table
Sl. No. Command Purpose
1 ls *.txt List all files with a .txt extension using a wildcard
2 echo "Hello" > [Link] Redirect output to create/overwrite a file
3 echo "World" >> [Link] Append output to an existing file
4 cat [Link] Display the contents of a file
5 ls -l | grep ".txt" Pipe file listing into grep to filter only .txt files
6 cat [Link] | wc -l Pipe file content into wc to count the number of lines
7 history | tail -5 Show the last 5 commands from the command
history

4. Graph
Not applicable — the command line produces text-based results in the terminal, not a graphical plot.

5. Calculation
Verification of the pipeline in Step 6: [Link] contains two lines ('Hello' from the '>' redirection, and 'World' appended
via '>>'), so 'cat [Link] | wc -l' is expected to output 2, which matched the actual terminal output, confirming correct use
of redirection, append, and piping together.

6. Conclusion and Critical Comment


Command-line operations involving output redirection, append redirection, piping between commands, and wildcard file
matching were performed successfully, and results were verified against manually predicted outcomes.
Critical Comment: A frequent and costly mistake is using single '>' when append ('>>') was intended, since '>' silently
overwrites and destroys the previous file content with no warning or confirmation — this has caused accidental data loss for
many beginners and is worth practicing carefully. Building a complex pipeline incrementally (testing each command
individually before chaining with '|') is a good debugging strategy, since errors in the middle of a long pipe can otherwise be
difficult to isolate.

You might also like