0% found this document useful (0 votes)
316 views188 pages

Copa Practicals Final

The document outlines the Competency Based Curriculum for the Computer Operator and Programming Assistant (COPA) under the Craftsmen Training Scheme in India, detailing the practical skills and assessment criteria required for the trade. It covers various topics including operating system installation, document creation, database management, web development, and cyber security practices. Additionally, it includes exercises for safe working practices, fire fighting, and computer assembly to ensure comprehensive training in IT and ITeS sectors.

Uploaded by

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

Copa Practicals Final

The document outlines the Competency Based Curriculum for the Computer Operator and Programming Assistant (COPA) under the Craftsmen Training Scheme in India, detailing the practical skills and assessment criteria required for the trade. It covers various topics including operating system installation, document creation, database management, web development, and cyber security practices. Additionally, it includes exercises for safe working practices, fire fighting, and computer assembly to ensure comprehensive training in IT and ITeS sectors.

Uploaded by

Poonam Gaikwad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 188

GOVERNMENT OF INDIA

MINISTRY OF SKILL
DEVELOPMENT & ENTREPRENEURSHIP
DIRECTORATE GENERAL OF TRAINING

COMPETENCY BASED CURRICULUM

COMPUTER OPERATOR AND PROGRAMMING


ASSISTANT (COPA)
TRADE PRACTICAL
(Duration: One Year)

CRAFTSMEN TRAINING SCHEME (CTS)


NSQF LEVEL- 3
P.R. GAIKWAD
S.Y. DESHMUKH

SECTOR – IT & ITeS


Computer Operator and Programming Assistant
6. ASSESSMENT CRITERIA

LEARNING OUTCOMES ASSESSMENT CRITERIA


1. Install and setup Identify basic first aid and use them under different circumstances.
operating system and Identify different fire extinguisher and use the same as per
related software in a requirement.
computer following Assemble a computer
safety precautions. Install and configure Windows OS.
Install the printer and other peripheral devices.
(NOS: SSC/N3022) Install application software.
Troubleshoot the PC.
Execute DOS and LINUX commands.
Customize Windows and LINUX OS settings.

2. Create, format and edit Create your resume using editing/formatting options in a document.
document using word Create purchase order using tables and images.
processing application Create magazine using columns page borders, header footers.
software. Create an invitation letter using mail merge for n invitees.

(NOS: SSC/N3022)

3. Create, format, edit and Identify Excel tools in the Ribbon.


develop a workbook by Create mark sheet using a spreadsheet with data validation.
using spreadsheet Create a chart for the mark sheet.
application software. Create Pay slip using functions and formulae with sharing two
different sheets/files.
(NOS: SSC/N3022) Create a table and Perform Sorting; filtering, Subtotal, validation, and
goal seek on a table.
Prepare a pivot table on any existing table with data.
Create a table and Perform Sorting; filtering, Subtotal, validation, and
goal seek on a table.
Prepare a pivot table on any existing table with data.

4. Create and customize Create simple presentations


slides for presentation. Create presentations with tables, images & graphic elements
Create presentations with audio & video elements with transitions
(NOS: SSC/N3022)

5. Create and manage Create simple database on Relational Database in MySQL using data
database file by using validation, filters, sorting, query.
MySQL. (NOS: Import, Export, Link, Backup and Retrieve database in MySQL.
SSC/N9401) Create query with functions, joins, sub-query.

11
Computer Operator and Programming Assistant

6. Install, setup/configure, Identify different cables and connectors used in networking.


troubleshoot and secure Assign Computer Name and workgroup to a computer Prepare UTP
computer network cross cable & connect computers.
including Internet.
Share a printer with Network.
(NOS: SSC/N3022) Share Internet using Windows Tools.
Check Network connectivity.
Configure HUB & Switch.
Configure DHCP and firewall.
Secure Network with various tools.
Create E Mail ID and sending / receiving mails Perform text chat and
video chat using social network sites Configure Outlook Express.

7. Develop web pages Create Text, Lists, Tables, and Frames with HTML.
using HTML, CSS . Create Hyperlinks, Images and Multimedia Working with Forms and
controls.
(NOS: SSC/N0503, Create Lists and Tables with CSS.
SSC/N0501) Create Box Model by using borders, Padding, and Margin with CSS.
Create CSS document by Grouping, Dimension, Display, Positioning,
Floating, Align, Pseudo class, Navigation Bar, Image Sprites, Attribute
sector.
Create simple static Web Pages using internal styles (CSS) and external
style.

8. Develop web pages Design a dynamic Web Page in JavaScript using various operators.
using Java Script. Design a dynamic Web Page in JavaScript using various control
statements and looping structures.
(NOS:SSC/N0503, Design a dynamic Web Page in JavaScript using strings and functions.
SSC/N0501) Design a dynamic Web Page in JavaScript using Arrays and objects.
Design a dynamic Web Page in JavaScript using Web Forms and images.

9. Create workbooks with Create workbooks with advanced functionalities in Excel.


advanced formulas, Create advanced charts & Pivot Tables.
macros, charts, pivot Create output files using specific Power tool.
tables and demonstrate
ability to use Power
tools.

10. Browse, select and Place order for products from E commerce websites for purchase.
transact using E- Upload a product in E Commerce site for sale.
commerce websites. Identify security issues in E- commerce and payment operations.

12
Computer Operator and Programming Assistant

11. Secure information from Provide firewall security for Internet connection and Network System.
Internet by using cyber Make backup copies of important file, data, and information.
security concept. Secure your Wi-Fi networks using wireless security features.

12. Explain Cloud concepts Create cloud concepts.


& services and Describe Use common cloud services such as Office 365, Google Drive, Dropbox.
Application
Development Life Cycle. Identify the phases of Application Development Life Cycle.
Describe Roles in each of phases of the Application Development Life
Cycle.

13. Write programs using Install Python / Java.


Python / Java language. Perform operations on Python / Java ; construct simple code and
C
document these.
Cycle
Perform Document code segments using comments and
documentation strings.
Perform operations using in-built modules / libraries.

13
IT & ITES Exercise 1.1
COPA – Assemble a Desktop PC
1.1 Locate the electrical Connections with computer system setup
Objective:
 Identify the Power location and connection

Procedure
Task 1 : Identify the power Location and draw the layout of electrical connections to
computer system

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


IT & ITES Exercise 1.2.
COPA – Safe Working Practices
Identify Safety Symbols and Hazard Identification
Objective:
 Identify the four basic categories of safety sign
Procedure
Task 1 : Identify the four basic categories of safety sign

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


IT & ITES Exercise 1.3
COPA - Safe Working Practices

Practice safe methods of fire fighting in case of electrical fire


Objectives:

demonstrate the ability of fire-fighting during electrical fire


as a member of the fire-fighting team
as a leader of the group.

Requirements
Equipment/Machines

PROCEDURE

General procedure to be adopted during


electrical fire

1. Raise an alarm. Follow the methods giving below toraise an • follow the instructions, and obey. Be safe and do not get
alarm signals when the fire breakes out. trapped.
• do not use your own ideas.
a. Raise your voice and shout Fire! Fire! to draw
attention.
As a leader of the group
b. run towards fire alarm/bell to activate
c. switch off the mains (if possible) If you are giving instructions:
2. when you hear the alarm signal:
a. stopworking –locate and use co2 fire extinguisher
b. turn off all machinery and power
• seek for sufficient assistance and inform the fire brigade
c. switch off fans/air circulators/exhaust fans. (it's
• locatelocallyavailablesuitablemeanstoputoutthefire
good to switch off the sub-main)
• judge the magnitude of the fire, Ensure that emer-gency
3. If you are not involved in the fire fighting:
exitpaths areclear withnoobstructions andthen attempt to
a. leave the place using the emergency exit. evacuate the place. (Remove explosive materials,
b. evacuatethepremises substances that would easlycatch fire.
c. assembleatasafe placealongwith others • Put off the fire with assistance identifying people with
d.check,ifanyonehascalledthefireservices assigned responsibility for each activity.
e. closethedoorsandwindows,butdonotlockorbolt 5. Report the measures taken to put out the fire, to the
authorities concerned.
As a member of the fire-fighting team
4. If you are involved in fire fighting:
a. take instructions toextinguish fire in anorganize way.

If taking instructions:

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


IT & ITES Exercise 1.4
COPA – Safe Working
Practices Use of Fire
Extinguisher Objective:
 select fire extinguishers according to the type of the fire
 operate the fire extinguisher
 extinguish the fire.

13. Sweepfromsideto side approximately 15 cmoverthefuel


fire until the fire is put off. (Fig 9)

1 Alert people in the surrounding area by shouting


fire,fire, fire when you see fire (Fig 1a & b).
2 Informfireserviceorarrangetoinformthem
immediately(Fig 1c).
3 Open the emergency exit and ask the people
insidethe area to go away (Fig 1d).
4 Switch "OFF" all electrical power supply.

5 Analyze to identify the type of fire. Refer Table1.


6 Assume that is it type D fire (Electrical fire).
7 Select CO2 (carbon dioxide) fire extinguisher
8 Locate and take the fire extinguisher Check
for CO2 its expiry date.
9 Break the seal(Fig 6)
10 Pullthesafety pinfromthehandle.(Fig7)(the
Pin islocated at the top of the fire extinguisher.)
(Fig 7)
11 Aimtheextinguisher nozzleorhoseatthebaseof
thefire. (Thiswillremovethesource of thefuel
fire.) (Fig 8)
12 Slowlysqueezethehandleleverto discharge
theagent

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


Caution
 While putting off fire, the fire may flare up. In order to remember the simple operation of
fire extinguisher, remember P.A.S.S.
 Do not panic so long as it is being put off promptly
 If the fire does not respond well even after you This will help to use the fire extinguisher.
haveused the fire extinguisher, move away from P for pull
the fire point.
 Do not attempt to put out a fire when it emits A for aim
toxic smoke. Leaveitto theprofessionals.
 Remember that your life is more important than
S for squeeze
the property. So do not take risks.
IT & ITES Exercise 1.5
COPA – Computer Components
Identify computer peripherals and internal components
Objective:
• identify various input/output device connected to the computer
• identify different controls and ports on the system unit cabinet
• identify the internal parts of a system unit.

PROCEDURE
TASK 1 : To identify various input/output devices of connected to the computer

Table 1
SI. Name of the I/P and O/P

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


TASK 2 : Identify different controls, ports and connectors on the system unit cabinet

Fig 2

Table 3
Table 2 SI. No. Name the Parts on the CPU Rear Panel
SI. No. Name the parts on the CPU Front Panel 1

1 2

2 3

3 4

4 5

5 6

6 7

7 8

8 9

9 10

10 11

11
12
13
14
15
16
17

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


TASK 3 : Identify the internal parts of a system unit

Sl.No Name the parts of System Unit


.
1
2
3
4
5
6
7
8

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


Fig 5

SI. No. Name the parts of Mother board

1
2
3
4
5
6
7
8
9
10
11
12
13

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


IT & ITES Exercise 1.6
COPA – Assemble a Desktop PC
Assemble components of desktop computer
Objective: At the end of this exercise you shall be able to
 Identify the assemble components of desktop computer.

Tools/Equipment’s/Machines

 Intel Motherboard  RAM (DDR4/DDR5) - 1 No


supportedWith  HARD Disk SATA 3.5* - 1 No
(13/15/17/19 Processor  DVD Optical Drive SATA - 1 No
And DDR4/DDR5/ Latest Model - 1 No  Cabinet - 1 No
 13/15/17/19 Process with  SMPS ATX - 1 No
Heat ZinkFan - 1 No
 Thermal Paste - 1 No

PROCEDURE
MounttheCPUinthesocketofmotherboardbeca
want to reful not to install the CPU in wrong direction, if
could short- circuit and damage your
processor motherboard
Supported Motherboard (Fig 1) (Fig 2)

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


3 coolerto theMainboard ifrequired useThermal 4 Attach the RAM (memory) modules in
Paste. (Fig 3)Connect the CPU the

RAM cards line up with the prints


on themotherboard connector.
(Fig 4)

5 Open file cabinet case and mount the power supply 6 Attach the motherboard back place to the case and check
which is ATX type. Make sure to connect all the the motherboard mounting positions. (Fig 6)
connectionstotothedriversandthemotherboard.(Fig5)

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


7 Suitably positions the Motherboard in the cabinet (Fig 8 Mount the Hard Disk and connect it to the power
7) supplyand the motherboard. There should be
separate

should remove the jumper. (Fig 8)

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


10Connect the24-pinATXconnector andthe4-
digit pin
powersupplycontrolconnectortothemotherboard
.(Fig 10)

cable tothe device, hook it up tothe power supply. (Fig using DVD or USB then Follow the instructions toinstall.
11) (Fig 12)

Exercise : How many pins are there in DIMM?


Which is an internal power supply unit

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


IT & ITES Exercise 1. 7
COPA - Computer Basics & Software Installation
Installing windows 10 operating system
Objective: At the end of this exercise you shall be able to
• install windows 10 operating system.

Requirements
Tools / Equipments/Instruments
A working PC - 1 No.
- 1 No.

PROCEDURE
TASK 1: Install windows 10 operating system.
1 Boot from USB or CD with win 10 installer Fig 3
2 Select language to install as in Fig 1.
Fig 1

Fig 4

3 Select drive to install as in Fig 2.


Fig 2

Fig 5

4 Select windows 10. Home from list as in Fig 3.


5 Tick for agree license as in Fig 4 and next window
choose upgrade to install in window 7 or install to make
windows 10 freshas in Fig 5.

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


6 Click install now to start installation as in Fig 6. Fig 9

Fig 6

7 Enter product key given by Microsoft as in Fig 7. Fig 10

Fig 7

Fig 11

8 Click accept for legal terms as in Fig 8.

Fig 8

Fig 12

9 Click on use express setup as in Fig 9. 10


Click on next to Figures 10, 11,12 and 13.

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


Fig 13 Fig 16

11 Click on “I do” button to make owner ship as in Fig 14. 14 Set a Pin if it is to avoid password as in Fig 17.
Fig 14
Fig 17

12 Enter the registered Microsoft account or click skip 15 Select next with no changes in Fig 18 to files setup.
this step in the lower part as in Fig 15.
Fig 18
Fig 15

13 Put the code sent by Microsoft if using Microsoft


account as in Fig 16.

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


16 Select next in cortana as it is in default as in Fig 19. Fig 20

Fig 19

Fig 21
17 Select options in Fig 20 and click next.
18 Enter the PIN entered previously to enter into windows
10 as in Fig 21.

Exercises:
List the various Operating System Available in the market.
Make the portion on harddisk space into three partition.

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


IT & ITES Exercise 1.8
COPA - Computer Basics & Software Installation

Install printer, scanner, Web camera & DVD drives


Objectives: At the end of this exercise you shall be able to
• add local printer in windows 10 operating system
• install a wireless printer
• Setup the Home group
• Connect to a shared printer on the HomeGroup
• Add a Scanner to Windows 10 PC.

Requirements
Tools / Equipments/Instruments
PC with windows 10 OS - 1 No. /trainee

DVD drivesoftware

PROCEDURE
TASK 1: Add local printer in windows 10 operating system

The most common way to connect a printer to the PC is by USB cable, which makes it a local printer.
And also install a wireless printer or add a printer connected to another computer on your network.
We'll cover these scenarios below.

1 Connect the printer to your computer using the USB Fig 2


cable and turn it on.
2 Open the Settings app from the Start menu as shownin
Fig1.

Fig1

Fig 3

3 Click Devices as shown in Fig 2.


4 Click Add a printer or scanner as on Fig 3.

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


Fig 6
5 If Windows cannot detect the connected printer, click
the The printer that I want isn't listedlink as shown in
Fig 4.
Fig 4

10 On the Install the printer driver window, from the


displayed list of printer manufacturers in the left
section, click to select the one to which the connected
printer belongs.
11 From the right section, locate and click to select the
6 On the Find a printer with other options window, clickto specific model of the printer that is connected to the
select the Add a local printer or network printer with PC.
manual settings radio button.
7 Click Next to continue as on Fig 5. Note: At this point, you can also click the Have
Disk button and browse and locate the driver
Fig 5 for the connected printer if you have
downloaded it manually from its official
website.

12 Click Next to proceed to the next step as on Fig 7.

Fig 7

8 On the Choose a printer port window, leave the default


options selected and click Next.

If you are an advanced user, you can also


choose a different option from the Use an 13 Type a printer name window, in the Printer name field,
existing port drop-down list, or you can define type an informative name for the printer as shown in Fig
your own port by selecting the Create a new 8.
port radio button and specifying your custom 14 click Next.
port in the enabled field as on Fig 6.

9 click Next.

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


Fig 8 17 opulate the Location and Comment fields with your
preferred information. Optionally p
18 Click Next to continue as on Fig 9.

Fig 9

15 If you share the printer , select "Share this printer so


that others on the network can find and use it" radio
button

Note: If you do not want to share the printer 19 On the final page of the wizard, click the Print a test
with the network users, you can select the Do page button to check the connectivity and proper
not share this printer radio button. functioning of the printer.
16 In the Share name field, type a short share name for 20 (Optional)Click Finish to complete the process.
the printer.17. Optionally populate the Location and
Comment fields with your preferred information.

Note: The name you specify here will be


displayed to the remote users when they
search for this printer over the network.

TASK 2: Installing a wireless printer

1 Open Settings as shown in Fig 10. 2 Click on Devicesas shown in Fig 11.

Fig 10 Fig 11

3 Click on Printers & scanners.

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


5 Select the printer from the list and click Add device to
4 Click on the Add a printer or scanner button as on install the wireless printer to Windows 10 as shown in
Fig 12. Fig 13.

Fig 12
Fig 13

TASK 3: Setting Up a HomeGroup

1 Right-click on the wireless icon in the taskbar and 3 Click the "Create a homegroup" button as on Fig 15.
select "Open Network and Sharing Center".
Fig 15

2 Click "Ready to create" next to HomeGroup. If a


HomeGroup already exists on the network, it will say
"Joined." As on Fig14.

Fig 14

4 Click Next.

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


6 Write down the HomeGroup password Windows
5 Select what you want to be shared. Printers & Devices creates for you. user need it for each computer you
are shared by default as shown in Fig 16. want to join the HomeGroup.
Fig 16
7 Click Finish.

TASK 4: Connecting to a Shared Printer on the HomeGroup

1 Click "Homegroup" and then the Join now button in


Fig 19
Windows Explorer. (Fig 17)
Fig 17 4 Enter the password and click Next as shown in Fig
20.

2 Click Next (Fig 18).

as on Fig 19.
Fig 18
Fig 20

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


5 Click Finish as shown in Fig 21. 6 Click Network in Windows Explorer and see the shared
printer installed as on Fig 22.
Fig 21
Fig 22

TASK 5: Adding a Scanner to Windows 10 PC

1 Go to the search box on the taskbar and type control 2 locate and select Devices and Printers as on Fig 24.
panel. Cortana will also display the Control Panel and
its icon as the Best Match, click on it as shown in Fig Fig 24
23.

Fig 23

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


Installing Web camera
3 InsideDevices and Printers, find a blank space and
perform a right-click there. Few options will appear, 1 Connect your Web camera to your computer.
click Add devices and printers as on Fig 25. 2 Wait for your computer to detect the Web camera.
Fig 25 Because you have windows Vista installed on your
computer, your computer will automatically detect that a
new peice of hardware was connected to your USB port.
A message will appear in the bottom right corner of your
screen that reads, “your devices are ready touse” or
3 Install the Software to operate the camera, your camera
came with software to install on your computer. Simply
insert the disk that came with your web camera and
follow the instruction.
Installing DVD writer
1 Connect your DVD writer to your computer.
2 Wait for your computer to detect the DVD writer.
Because you have windows Vista installed on your
computer, your computer will automatically detect that a
new peice of hardware was connected to your USB port.
4 A small box with a title Add a device will be visible on A message will appear in the bottom right corner of your
the screen and it will start finding the device. screen that reads, “your devices are ready touse” or
5 After the scan gets over, the scanner name will be 3 Install the Software to operate the DVD writer, your
displayed on the box. So, select the scanner name DVD writer came with software to install on your
and click Next as shown in Fig 26. computer. Simply insert the disk that came with your
DVD writer and follow the instruction.
Fig 26

6 Finally, successfully added the scanner to Windows


10 PC.

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


IT & ITES Exercise 1.9

COPA - Computer Basics & Software Installation


Installing system application software
Objectives: At the end of this exercise you shall be able to
• Install MS-Office 2010
• Instal Nero software in windows operating system
• Instal VLC Media player
• Instal Adobe PDF Reader
• Download and Install Avira Free Antivirus software in windows operating system

Requirements
Tools / Equipments/Instruments
PC with MS-Office

PROCEDURE
TASK 1: Installing Ms-Office 2010

Hardware and Software Requirements Fig 1

Microsoft Office 2010 is available in both 32


and 64-bit versions and will install on the
following minimum hardware requirements.
• 500 MHz or faster processor
• 256 MB or more RAM memory
• 3 GB or larger available hard disk space
• 1024x578 display resolution
• Windows XP SP3 32-bit, Windows Vista
SP1 32/64-bit, Windows Server 2003 R2 32/64-
bit with MSXML 6.0, Windows Server 2008 32/
64-bit or later, Windows 7 32/64-bit, Windows
8 32/64-bit, Windows Terminal Server and
Windows on Windows applications are Fig 2

supported as well.

When inserting the CD a prompt should show


windows explorer
1 Confirm whether PC meets the Office 2010 system
requirements.
2 Check to see if your PC is preloaded with Office 2010.
3 Click Run SETUP.EXE as shown in Fig 1.
4 Read the Microsoft Software License terms, place a
check mark in the box to indicate that agree with them
and press the Continue button as shown in Fig 3.

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


5 Enter the 25 character product key on the MSU CD Fig 5
case and then click Continue as shown in Fig 2.

Fig 3

7 Click Close when the installation completes as shownin


Fig 6.

Fig 6
6 Press the Install Now button to begin the installation
as shown in Fig 4.

Fig 4

The Fig-5 shows the progress bar will indicate


how far along the installation has progressed.
Depending upon the speed of the computer,
this step could take several minutes on older
systems.

TASK: 2 Installing nero software in windows operating system

1 Double click the application file of Nero as shown in


Fig 7. Initial file extracting window will appear as
on Fig 8.

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


Fig 7 3 Click "Next" in the installation wizard as on Fig 11

Fig 11

Fig 8

4 Type the user name , organization and serial number


as on Fig 12

Fig 12

2 Click "Run Program" button as on Fig-9

Fig 9

Serial number look it printed on CD ROM


5 Select the setup type as "Custom" as on Fig 13

Fig 13

Window files configuring process will appear


few seconds as on Fig 10

Fig 10

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


6 Select "English" and click "Next" in the language The installation process wizard will appear as
selection window as on Fig 14 on Fig 17

Fig 14 Fig 17

9 Click "Finish" button in the installation wizard as on


Fig 18.
7 Click "Next" in the custom setup window as show in Fig 18
Fig 15.

Fig 15

10 Get it check with your instructor.

8 Click "Install" in the installation wizard as shown in


Fig 16

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


Fig 16

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


TASK 3: Installing VLC media player

1 Double click on the Vlc-3.0.2-win32 exe file as on 5 Click the Next Button On the License Agreement
Fig 19. window as on Fig 22.
Fig 19 Fig 22

2 Click Run button in the window 6 Select components of Media player and click Next
3 Select the language and click ok button as shown in Button as shown in Fig 23.
Fig 20.
Fig 23

Fig 20

4 Click Next Button as shown in Fig 21.

Fig 21
7 Click Install Button as on Fig 24.
Fig 24

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


The installation process window will display Click Finish Button as on Fig 26.
as on Fig 25.
Fig 26

Fig 25

TASK 4: download and install the adobe Acrobat Reader DC from the Internet
1 Open thebrowser
Fig 28
2 Fig
Select
27
the corresponding website https://
get.adobe.com/reader/otherversions/ as shown in Fig
27

The down loading process will start and the


EXE file will show bottom of the Browser
3 Slect"windowsversion, Language and Readerversion"
Fig 29
4 Click download button as shown in Fig 28. 5 Click the up arrow and again click show in folder menu
as shown in Fig 29

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


8 After complete the installation click Finish Button as
6 Double click the file as shown in Fig 30. shown in Fig 33.
Fig 30

Fig 33

7 Click Run button as shown in Fig 31.


Fig 31

The welcome window is shown in Fig 34

Fig 34

The down loading process window is shown in


Fig 32.

Fig 32

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


TASK 5: Installing Avira Free Antivirus software in windows operating system

1 Click "Google Chrome" icon in windows task Bar as 4 Click "START NOW" button in the web site as shown
shown in Fig 35. in Fig 37.
Fig 37
Fig 35

2 Type the text "download avira antivirus for windows


10" in text box and click "Search" Button as shown in
Fig 36.
5 After download the file "click the ^ button" and click
Fig 36 "open" menu as shown in Fig 38.

Fig 38

Display the list of related links in the chrome


6 Click "Run" button in the below window as Shown in
web page.
Fig 39.
3 Right click on the related link and click "Open link in
new tab" as shown in Fig-36. Fig 39

The corresponding software exe file will


download bottom of the web page

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


The bellowed screen shows "This will down Fig 42
load and install the software on your
computer"

7 Click "Next" to continue the downloading process as


on Fig 40.

Fig 40

Fig 43

The downloading progress bar will display the


downloading status as shown in Fig 41.

Fig 41

10 Click "install now" button in the bottom of the window.

The"preparing installation" process begins as


on Fig 44.

Fig 44

8 Click "Finish" button after complete the 100%


downloading progress as on Fig 42.
9 After complete the downloading process the window
will appear as on Fig43.
After complete the "preparing installation"
process the " Choose Installation Type"
window will appear

11 Select the "Express(Recommended)" setup type


option and select the license agreement and privacy
policy option in the bottom of the window as shown in
Fig 45.

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


Fig 45 Fig 47

12 Click "Next" button

The Avira Antivirus application installation 13 Get it checked with your instructor.
completed as shown in Fig 46 and 47

Fig 46

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


IT & ITES Exercise 1.10
COPA - Computer Basics & Software Installation

Identify and rectify common hardware and software issues


Objective: At the end of this exercise you shall be able to
• write chart of issues found while installation of OS

Requirements
Tools / Equipments/Instruments

PROCEDURE
TASK 1 : Write chart of issues found while installation of OS

or

Sl.No. Problem Found Instruction from Instructor

SW | HW

SW | HW

SW | HW

SW | HW

SW | HW

SW | HW

SW | HW

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


IT & ITES Exercise 1.11A
COPA - DOS Command line Interface and Linux Operating System
Basic DOS Commands
Objectives: At the end of this exercise you shall be able to
• enter to dos command prompt
• use basic dos commands
• list directory contents using DIR command
• view directory structure.

Requirements

PC with windows 10 OS - 1 No. /trainee

PROCEDURE
TASK 1: Enter in to DOS command prompt

1 In Windows 10, one of the fastest ways to launch field from your taskbar, enter command or cmd (Fig
Command Prompt is to use search. Inside the search 1) Then, click or tap on the Command Prompt result.

Search Box

2 Command prompt window is displayed on the screen. (Fig2)

Fig 2

NOTE: Command Prompt is not case sensitive,


meaning that commands can be typed with
capital letters, lowercase or any combination
of them. The commands date or DATE will all
work in the same way.

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


TASK 2: Use basic DOS commands
Note: Each and every DOS command should 6 If the current time is not displayed, type the Currenttime
be typed at Dos Prompt only and Enter key as shown in the box given below. (Fig 6)
should be pressed at the end of each DOS
command to execute it. Fig 6

a Change the working drive from C to D


1 Type D: at DOS prompt as shown below.
C:\Users\nimi> D:
7 Enter the TIME command to check the new date is
Note: is the symbol for pressing Enter key on set. Record the displayed time.
the keyboard. When we enter wrong DOS
command, it displays Bad command or d Clears screen
filename or some other error messages CLS command is used to clear the screen.
(discussed in Related Theory 1.5.01). We have to
correct the Wrong DOS command to get the
result.
D:\>CLS
Now the prompt is changed from C:\Users\nimi> to D:\> The displayed contents are cleared and the DOS prompt
and the currently working drive is changed from C to D. appears at the top left corner of the screen.
b View/change System date e Change the prompt
DATE command is used to view/change system date. PROMPT command is used to change the DOS prompt.
D:\>DATE 8 Type the following PROMPT command to change the
DOS prompt from D:\>to copa>. Record the output.
1 It displays the current date as shown below (Fig 3) D:\>PROPMPT copa$G

Fig 3
Note :$Grepresents>(greater than) sign.

9 Type the following PROMPT command to set the


current date as DOS prompt. Record the output.
D:\>PROPMPT $D$G
3 If the current date is not displayed, type the Current
date as shown in the box given below. (Fig 4) 10 Type the following PROMPT command to change the
DOS prompt back to D:\>and Record the output.
Fig 4
D:\>PROPMPT $D$G
f Create, change, or delete a volume label on a
logical drive
LABEL command is used to Create, change, or delete a
volume label on a logical drive

4 Enter the DATE command to check the new date is 11 Type the following command
set. Record the displayed the date. D:\>LABEL
Record the displayed date. 12 It displays the existing label and also allows you to
c View/change System time type new label as shown below. Record the output.
(Fig 7)
TIME command is used to view/change system time.

D:\>TIME Fig 7

5 It displays the current time as shown below (Fig 5)

Fig 5

13 Retype the LABEL command and record the output.

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


g Display the volume label and volume serial number on a i Display complete system information for Microsoft
logical drive Windows computers.

14 Type the following command 19 Type the following command

D:\> SYSTEMINFO
D:\> VOL
20 It displays the complete system information as shown
15 It displays the volume label and volume serial numberof
below. (Fig 10)
D drive as shown below. Record the output.(Fig 8)

Fig 10

h Print the name and version of the operating system 16


Type the following command

D:\> VER
17 It displays the name and version of the Operating
system as shown below. (Fig 9)

Fig 9
Record the output.
j Exit DOS session
EXIT command is used to exit the DOS session.21
Type the following command

D:\> EXIT
18 Record the output. It exits the DOS session and return to Windows OS.

TASK 3: List directory contents using DIR command.

DIR command displays a list of files and directories in a 4 Type the following command
directory.
E:\> DIR htmlnimi
1 Change over to E drive by typing E: at DOS prompt.
5 Displays a list of files and directories of HTMLNIMI
2 Type the following command.
directory of E drive as shown below. Record the output.
E:\> DIR (Fig 12)

3 It displays a list of files and directories of E drive as


shown below. (Fig 11)

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


Fig 12

Fig 11

78

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


6 Type the following command 9 It lists all files and folders begin with letter H and have
any extension as shown below. (Fig 14)
Note : /AD is a switch or option used with DIR
command to display only the directories of
specified drive or directory.

E:\> DIR/AD
7 It displays only the directories of E drive as shown
below. Record the output. (Fig 13)
Fig 13

10 Type the following command.

E:\> DIR ?????


11 It lists all files and folders which are 5 characters long
without any extension as shown below.

Note:Wildcards are typically either an asterisk


(*), which represents one or more characters
or question mark(?), which represents a single
character.For more switches of DIR command
8 Type the following command. refer Related Theory 1.5.01 and practise them
with the help of instructor and record the ouput.
E:\> DIR H*.*

TASK 4: View directory structure using TREE command

TREE command graphically displays the folder structureof Note : If the TREE command displays the
a drive or path. directory structure more than a page, then use
1 Type the following command |more (pipe symbol | is available with \ key in
keyboard) command with TREE command
(TREE | MORE) to view the directory structure
E:\> TREE
page by page.
2 It displays the directory structure (only directories) of 3 Type the following command
aE drive as shown below. Record the output. (Fig 15)
E:\> TREE/F htmlnimi
Fig 15

/F switch is used with TREE command to


display both the files and subdirectories of
HTMLNIMI directory as shown below. Record
the output.

Fig 16

Get all the recorded output checked by the instructor.

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


IT & ITES Exercise 1.11B
COPA - DOS Command line Interface and Linux Operating System
Managing files and folders using dos commands
Objectives: At the end of this exercise you shall be able to
• manage files using DOS commands
• manage directories using DOS commands

Requirements

PC with MS-Office - 1 No.

PROCEDURE
TASK 1: Manage files using DOS commands

Practice the following DOS commands in Command 3 COPY lesson1.txt ex1.txt


Prompt, record the output and get it checked by the
instructor: • It copies lesson1.txt to ex1.txt as shown in Fig 3.

Note :File name should not be greater than 11 Fig 3


characters out of which 8 characters are for the
name and 3 characters are for the extension.

1 COPYCON lesson1.txt
• It creates the text file lesson1.txt as shown in Fig 1

Fig 1

• Use DIR command to check that the file ex1.txt is in


the list.
4 REN ex1.txt notes.txt
• It renames the file ex1.txt as notes.txt as shown in
Fig.4
• Use DIR command to check that the file ex1.txt is
renamed as notes.txt (Fig 4)

Fig 4

• ^Z (Ctrl Z) or F6 is used to save the text file.


2 TYPE lesson1.txt
• It displays the content of the text file lesson1.txt as
shown in Fig 2.
Fig 2

5 DEL notes.txt
• It deletes the file notes.txt as shown in Fig.5

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


Fig 5 Fig 6

• Use DIR command to check that the file notes.txt is


available in the list.
6 SORT lesson1.txt Fig 7

• It sorts the content of the file lesson1.txt as shown inFig


6.
7 (i) FIND "SYS" lesson1.txt
• It searches for a text string "SYS" in the text file
lesson1.txt anddisplays a line having the text string
"SYS"as shown in Fig.7
(ii) FIND/n "SYS" lesson1.txt
• It searches for a text string "SYS" in the text file
lesson1.txt anddisplays a line having the text string
"SYS"with line number as shown in Fig 7.

TASK 2: Manage directories (folders) using DOS commands

Practise the following DOS commands in Command 2 CD training


Prompt, record the output and get it checked by the
• It changes the current directory to training and it can
instructor:
be seen in the DOS prompt as shown in Fig 9 .
1 MD training
Fig 9
• It creates the new directory "training"as shown in Fig.8
• Use DIR command to check the directory "training" isin
the list. (Fig 8)

Fig 8

• MD Theory
It creates a new subdirectory Theory in the main
directory training
• MD Practical
It creates a new subdirectory Practical in the main
directory training
• Use DIR command to check that the new
subdirectories Theory and Practical are listed in the
main directory trainingas shown in Fig.10

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


It exits all directories Theory and training and goes to
the root directory E:\ as shown in Fig.13

Fig 13

• CD Practical
It changes the current working directory to Practical as
shown in Fig.11 4 RD training
• RD command removes the empty directory only. So
first thing is to remove all files and directories inside
the directory training.
• CD training
It changes the current working directory into training
(Fig.14)
• RD Theory
3 CD..
It removes the empty subdirectory Theory (Fig.14)
• It exits current working subdirectory Practical and goesto
the main directory trainingas shown in Fig 12. • RD Practical
It removes the empty subdirectory Practical(Fig.14)
• CD..
It exits the current working directory training and goes
to E:\>(Fig.14)
• Use DIR command to check the availability of the
directory training (Fig.14)

Fig 14

• CD Theory
It changes the current working directory to Theory as
shown in Fig.13
• CD\

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH
TASK 3: Create the given Directory Stucture (Fig.15)

E:\>MAINDIR1 Command sequence to create the given directory


structure and it is shown in Fig 17:
<Subdir1>
<Subdir2> Fig 17

File1
<Subdir3>
• Use TREE command to view the directory structure of
the directory MAINDIR1(Fig 16)

• MD MAINDIR1 - Creates MAINDIR1


• CD MAINDIR1 - Enters into directory
MAINDIR1
• MD Subdir1 - Creates Subdir1
• MD Subdir2 - Creates Subdir2
" CD Subdir2 - Enters into Subdir2
• COPY CON File1 - Creates the file File1
• ^Z - Saves the file File1
• MD Subdir3 - Creates Subdir3
• CD\ - Exits all subdirectory
and goes to root
directory E:

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


IT & ITES Exercise 1.11C
COPA - DOS Command Line Interface and Linux Operating Systems

Use basic Linux commands for directory listing File, Folder management,
Passrord etc.,
Objectives: At the end of this exercise you shall be able to
• list directories with the ls command
• list and combine files with the cat command
• move to directories with cd command
• find files with the find, where and locate command

PROCEDURE
TASK 1 : Listing directories with the ls command

1 Open the console window.


Fig 3
2 Type ls and press enter.
3 Observe the output on the screen. The output will beas
shown in Fig - 1.

Fig 1

Fig 4

4 To list the files as well as directories those are kept in the


particular working directory type ls -l. The output will
display as on Fig - 2.

Fig 2

Fig 5

5 Type the following command in console window.


$ ls -la
The output window will display as on Fig - 3.
6 Type the command ls -li in console window and 8 Type the command ls -x in the console window. The
observe the output. The output window will display ason output window will appear as on Fig - 6.
Fig - 4.
Try the following commands in console window, write the
7 In console window type ls -m. The output window will description and observe the output screen in record sheet
display as on Fig - 5. with the help of Instructor.

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


Commands Description
Fig 6
ls /usr
ls -R /
ls -Rd /*/*/*
dir
Vdir

TASK 2 : Listing and combining files with the cat command and rediretion

1 Type the following command in console window and 3 In console window type the cat -n command followed
type the text under the command for creating new textfile by file name for display line numbers in the file
as shown in Fig-7. content. The output window will appear as on Fig-9.
$ cat > samplefile1.txt welcome
to ubuntu linux
Fig 9
this is sample file using cat command
enjoy the ICTSM subject
The output window will appear as on Fig-7.

Fig 7

$ cat -n samplefile1.txt
Try the following commands in console window, write the
description and observe the output screen in record sheet
with the help of Instructor.

Commands Description
2 Type the cat command followed by filename for
displaying content of the file. cat -n samplefile1 samplefile2
$ cat samplefile1.txt welcome (or)
to ubuntu linux cat -n samplef*
this is sample file using cat command $cat sample* > samplefile3.txt
enjoy the ICTSM subject $cat samplefile1.txt>>samplefile2.txt
The output window will appear as on Fig-8. $ wc samplefile1.txt

Fig 8

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


TASK 3 : Moving to directories with cd command
1 Type the command cd /usr/bin in command window for 3 Type the command cd ../.. in console window to
moving the cursor /usr/bin directory. The output win- move root directory. The output window will
dow will appear as on Fig-10. display as on Fig-12.

Fig 10

4 Type the command cd ~ (or) cd in console. For go


back the blinking cursor to home directory. The
2 In console window type cd .. command for move up output window will appear as on Fig-13.
one stage to the previous directory. Observe the
output screen. The output window will appear as on
Fig-11. Fig 13

Fig 11

5 Type the command pwd in console window for


print working directory. And observe the output
window. Andverify it with your instructor.

TASK 4 : Find files with the find, where and locate command
`Grep command $ grep UNIX example.txt
2 Create a file using cat command as show below
The output will display as below.

Fig 14
UNIX operating system
UNIX and Linux operating system
4 Type another grep command with option -v to
exclude matching word as shown in below grep
command for example.
$ grep UNIX example.txt | grep -v Linux
UNIX operating system
5 Try the grep command with some attributes and check
the output with the help of instructor.
$ cat example.txt 6 Type the following example in the console and record
UNIX operating the output with the help of your instructor.

system $ cat testfile.txt

UNIX and Linux operating a

systemLinux operation system b

3 Type the grep command for searching particular c


word as shown in below. d

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


$ grep -v -e "a" -e "b" -e "c" testfile.txt Fig 16
7 Write the output with description in the below box.
Commands Description
grep -c UNIX example.txt
grep -v -c testfile.txt grep
-l "hai" testfile*
8 Type whereis command followed by and another
command. It will shows that the command where it is
located. The output window will appear as on Fig-15.
9 Type the command locate in console window. The
output window will appear as on Fig-16.

Fig 15

as on Fig-17.

Fig 17

10 To get the summery of particular command, type whatisin


the console window the output window will display

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


IT & ITES Exercise 1.11.D
COPA - DOS Command Line Interface and Linux Operating System

Practice on manipulation and searching commands


Objectives: At the end of this exercise you shall be able to
• manage files and directories using various commands
• handle user level commands and changing the permissions
• handle additional commands.

PROCEDURE
TASK 1 : Manage files and directories using various commands

1 Open the console window.


8 In console window type rmdir followed by directory
2 Type the touch command in console. name for used to remove a empty directory for
example.
3 Observe the output. The output window as on Fig
- 1. $ rmdir dirname

Command Description
Fig 1
rmdir -p dir1/dir2/dir3
rmdir dir1/dir2/dir3 dir1/dir2 dir1
rm -rf dirname

9 Type the command mv in console window for moving


one file or directory from one place to another place, it
is also used for renaming a directory or file for
Example.
$ mv oldfilename newfilename (to change the file name)
10 Try the mv command with some attributes

Command Description
4 Type the rm command in console window for using
remove a file for example. mv foo /tmp
$ rm testfile1.txt mv foo /tmp/joe
mv /tmp/foo .
5 Try the rm command in console window with additional
attributes and record the outputs with screenshots. mv /tmp/foo ~
mv /tmp/foo ~/dir1
6 Type the command mkdir followed by directory name
in console window for make a new directory for mv foo1 foo2 foo3 dir1
example:- mv foo[123] dir1
$ mkdir computer mv foo* dir1
mv dir1 dir2
7 Try the mkdir command followed by different attributes
with directory name. 6 In console window type the command cp for copy the
file to the destination directory for example.
Command Description
$ cp /home/fruits/mango.txt /root/abcd
mkdir memos letters email
7 Try the cp command with some attributes and check
mkdir -p /home/joe/customer/babu with instructor.

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


Command Description
cp chapter1 /tmp
cp chapter1…
cp file1 file2 file3 /tmp
cp -r foo /tmp
cp /tmp/foo ~/dir1
cp foo1 foo2 foo3 dir1
cp foo[123] dir1
cp foo* dir1
cp -r dir1 dir2

TASK 2 : Handle user level commands and changing the permissions

User add -to create a new user 1 Add single permission to a file/directory
1 Type the command useradd in console window and Example
record the output for example.
$ chmod u+x filename
$ useradd username
Output:-
2 In console window type the userdel followed by user
name to remove a user from linux for example 2 Add multiple permission to a file/directory
Example
$userdel tarun
$ chmod u+x, g+x filename
3 Type the command groupadd in console window to
add a new group for Example Output:-
$ groupadd fruits 3 Remove permission from a file/directory
4 In console window type the gruopdel command to de- Example
lete a group for Example
$ chmod u-rx filename
$ groupdel fruits
Output:-
5 Type the command chown in the console window to
4 Change permission for all roles on a file/directory
change the ownership of a file or directory for example
Example
$ ls -l
$ chmod a+x filename
drwxrw-rw- 2 root root 4096 Mar 11 12:03 abcd
Output:-
(permission) (owner) (group own) (size) (name)
5 Make permission for a file same as another file (using
6 And typethe following in console window
reference)
$ chown tarun /abcd
Example
$ ls -l
$ chmod --reference= file1 file2
drwxrw-rw- 2 tarun root 4096 Mar 11 12:03 abcd
Output:-
7 In console window type chgrp to change the group
6. Apply the permission to all the files under a directory
ownership of a file or directory for example
recursively
$ ls -l
Example
drwxrw-rw- 2 tarun root 4096 Mar 11 12:03 abcd
$ chmod -R 755 directory-name/
$ chgrp tarun /abcd
Output:-
$ ls -l
7. Change execute permission only on the directories (files
drwxrw-rw- 2 tarun root 4096 Mar 11 12:03 abcd are not affected)
Try the following commands in the console window, Example
write the output and verify it with the help of instruc- tor
$ chmod u+X *
Output:-

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


TASK 3 : Handling additional commands

1 Clear -it will clear the screen (shortcut ctl+l) August 2007
forexample.
Mo 6 13 20 27
$ clear
Tu 7 14 21 28
2 Exit -to end a current session as well current
We 1 8 15 22 29
terminallogging for example.
Th 2 9 16 23 30
$ exit
Fr 3 10 17 24 31
3 Man -to view the mannual page of commands
forexample. Sa 4 11 18 25
$ man mkdir Su 5 12 19 26

4 --help -to view the help documents of a 12 Try the cal command with various attributes and ob-
commandexample. serve the output screen with the help of instructor
$ ls --help Command Description
5 Who -This command is used to display user name
and their ip addresses who have loged in on your cal 1 2007
server example. cal -3
$who cal -J
6 whoami -this command shows the current logged cal -e
interminal user name for example
cal -m
$whoami
cal -j
8 su -username to switch from one user to another
users home directory for example. cal -p
$su mango cal -w

9 type the date in console window for displaying current cal -y


system date for example.
13 Type the paswd command in console window to change
$ date the password for the current user for example
Wed Aug 18 16:24:44 EDT 2015 $ passwd dhinesh
10 Type the Cal command in console window to Enter new UNIX password:
displaythe calendar of the current month for
example. Retype new UNIX password:

$ cal passwd: password updated successfully

August
2007 $ chage --list dhinesh
Su Mo Tu We Th Fr Sa Last password change : Apr 23, 2009
1 2 3 4 Password expires : never
5 6 7 8 9 10 11 Password inactive : never
12 13 14 15 16 17 18 Account expires : never
19 20 21 22 23 24 25 Minimum number of days
26 27 28 29 30 31 between password change : 0
11 In console window type the ncal command for Maximum number of days
chang-ing the output format for example between password change : 99999
$ ncal Number of days of warning
before password expires 7

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


IT & ITES Exercise 1.12
COPA - DOS Command Line Interface and Linux Operating System

Install necessary application software in Linux


Objectives: At the end of this exercise you shall be able to
• install adope reader in linux OS
• install VLC media player in linux OS
• install libreoffice in linux OS.

PROCEDURE
TASK 1 : Install adope reader in linux OS

1 Open up terminal by pressing Ctrl+Alt+T on 7 Execute the command sudo apt-get update
keyboard.
8 Execute the command sudo gedit /etc/gnome/
2 Execute the command sudo add-apt-repository defaults.list to Set Adobe Reader as default PDF reader
“debhttp://archive.canonical.com/ precise
partner” 9 Find out and change the line application/
pdf=evince.desktop into application/
3 Type the user password when it asks. pdf=acroread.desktop

Note: That there’s no visual feed back when And add below line into the end
you typing a password. application/fdf=acroread.desktop
4 Update package lists by running the command application/xdp=acroread.desktop
sudoapt-get update
5 Install acroread package by running the command application/xfdf=acroread.desktop
sudoapt-get install acroread
application/pdx=acroread.desktop
6 Remove the Canonical Partners repository by
running the command sudo add-apt-repository - 10 Save the file and restart nautilus by the command
r “deb http:// archive.canonical.com/ precise nautilus -q in terminal to apply changes.
partner”

TASK 2: Install VLC media player in linux OS

1 Open up terminal by pressing Ctrl+Alt+T on 5 Install acroread package by running the command sudo
keyboard. apt-get install acroread
2 Run the command sudo apt-get update to refresh 6 Remove the Canonical Partners repository by running
thesoftware repository catalogue the command
3 Run the command sudo apt-get install vlc to sudo add-apt-repository -r “deb http://
installVLC Media Player archive.canonical.com/ precise partner”
4 When prompted with the ‘Do you want to 7 Execute the command sudo apt-get update.
continue’press ‘Y’ on keyboard.

TASK 3 : install libreoffice in linux OS

1 Open up Run Application dialog by pressing 3 Enter the password when asked and hit the OK button
Alt+F2on keyboard.
4 Hit the ALT+F2 key combination again and run the
2 Execute gksu add-apt-repository command gksu apt-get update in the “Run Application”
ppa:libreoffice/ppa dialog. (Fig 2)
in Run Application dialog (Fig 1)

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


Fig 1 7 Enter the password when terminal window will
appear and asked.
8 Type Y and hit Enter, When will be asked if you wantto
install the LibreOffice packages. (Fig 4)

Fig 4

Fig 2

þ9 Libre Office is now completely installed and ready touse.


(Fig 5)

Fig 5

5 Enter the password when asked and hit the OK button


6 Hit the ALT+F2 key combination again and run the
command sudo apt-get install libreoffice libreoffice-
gnome language-support-en in the “Run Application”
dialog. (Fig 3)

Fig 3

P.R.GAIKWAD COPA PRACTICAL S.Y.DESHMUKH


IT & ITES Exercise 2.1
COPA - Word Processing Software

Create, open, save and rename word document


Objectives: At the end of this exercise you shall be able to
• create and open a document
• edit text by using the keyboard and mouse
• save and rename the file.

Requirements

Tools/Equipments/Instruments
A working PC with
- 1 No./batch.
PROCEDURE

I Procedure (Step wise)


1. Create and Save Document
Create a new document Use relevant tool from the menu/ ribbon using short cut keys to
perform following tasks:
1. Type 15-20 lines of some useful text matter.
11. Apply formatting features on the given space of text/ line/ paragraph.
111. Go to relevant menu/option and change font face, size, color. Apply effects like bold,
italic, underline, subscript and superscript, use case changing options.
1v. Go to relevant option to preview a document to know how it will appear on paper when
printed.

2. To save a document
1. Go to relevant menu and choose save as option, now choose the location of
file to be saved i.e. the drive and the folder. Give the file name in File name
box and then set the file type in save as type box. Now press save button to
save the document.
11. To close and exit the document- close the window and exit the application.

3. Edit a Document
Open a document which needs to be edited. Traverse to the text/paragraph which needs to
be edited. Perform necessary action i.e. add new text/ delete or modify existing text. Perform
text level formatting on text.

II Exercise

1. Create a file with any arbitrary name. Write your name and basic
information about yourself in it. Save it at Desktop.
2. Open file created in Question 1. Delete some information and write word count
details from available menu/options.
Assignments :

There are different types of computer systems nowadays for different purpose according to the user
needs. However we can classify them into different groups based on different aspects. We can find four
different type of computers based on size. These are large computers that are most powerful. They can
complete tasks very soon and are optimized to complete given tasks quickly. Mainframe Computers.
These are the largest computers and can support hundreds of users simultaneously. These are powerful
computers and optimized to run maximum number of applications at one time. These are medium sized
computers –smaller than mainframe but much larger than personal computers. They can be the best
solution for medium scale organizations. Micro Computers. Micro computers are the smallest when size
is concerned. They range from Desktop, Laptop up to the palm top and even smaller ones. Because
micro computers are developed to support single person, they are often called personal computers
(PCs).
➢ Divide 4 paragraph for the above text and justify Alignment.
➢ Make Drop Cap the first letter of the second paragraph.
➢ Make 1.5" line spacing for third paragraph.
➢ Change font size on 17 points for the last paragraph.
➢ Apply numbers for the last two sentences for 4th paragraph.
➢ Set up the page layout on Landscape orientation and set up 1.50" and Right 1.05"
IT & ITES Exercise 2 . 2
COPA - Word Processing Software

Format the document in MS word


Objectives: At the end of this exercise you shall be able to
• format the text (Font or Character)
• change the space between character
• formatiing paragraph
• set ctabs and format the tab setting
• bullets and numbering
• add borders and shading.

Requirements

Tools/Equipments/Instruments
A working PC with MS office 2010 - 1 No./batch.

PROCEDURE
1. Use bullets, numbering and page formatting-
Create a document file and Apply operations to perform following tasks:

a. Apply bullets in list.Apply numbering in list.


2. Use different options to set bullets and number styles and format it.
3. Apply following page formatting features to a document file -
a. Adjust page margins
b. Change page orientation
c. Create headers and footers
d. Set and change indentations
e. Insert and clear tabs.

II Exercise

1. Open any file available on system, add some points and mark them as bullets,
change bullets styles and verify the results of all bullet styles.
2. Create new document and make following setting.
a. Page Size : A4
b. Orientation: Landscape
c. Margin : Top: 1.25" , Bottom 1.5" , Left 1.5" Right 1.0"
d. Page Border: Box
Assignment :

Q. Create Business Cards using Shapes, text, and colors

Q. Practice hyperlink and create links between word document texts to D: / Play songs from Microsoft word
text, create the link between internal and external files.

Q. Design display board and Logo by using Word Art and print it.

Q. Design E-book cover pages / Magazine front/ books front/back page using cover page option in Insert Menu

Q. Prepare document with inserting following


➢ pictures
➢ online pictures
➢ shapes
➢ SmartArt
➢ a chart
➢ screenshot
Q. Insert more than 2 shapes and group and ungroup the shapes

Q. Get the newspaper and see the text-based advertisement and Design that advertisement in Microsoft Word.

Q. Take a double-column book or newspaper and design or create a similar paragraph style in the word
document.

Q. Create a letterhead, Identity card of any company or institution that you got and insert the Watermark with that
company name in the document.

Q. Decorate word document with page border, content border, add pattern and write beautiful text in it.

Q. Insert Images and Practice on Format Menu and Image options.


Q. Insert template or download the new template in Microsoft Word from the Internet and edit those templates
with your content.
Q. What is section Break? What are section breaks used for in a Word document?
Q. What are captions in Microsoft Word? Why do we use caption in word?
Q. What are footnotes or endnotes? What is the purpose of footnote and endnote?
Q. What is bookmark and cross reference? What is the purpose of a cross reference and bookmark?
Q. What does track changes mean in a Word document? How do you turn off Track Changes in Word?
What is Equation Editor in MS Word? Write following
equations.
IT & ITES Exercise :2.3
COPA - Word Processing Software

Insert and format the table


Objectives: At the end of this exercise you shall be able to
• insert table in different methods
• format the table
• convert text to a table and convert table to text.

Requirements

Tools/Equipments/Instruments
A working PC with window, OS and MS Office 2010 - 1 No.

PROCEDURE

1. Go to insert menu.
2. Choose the Table option from Ribbon/menu item.
3. Specify the number of rows and columns.
4. Insert table in the document.
5. Apply table formatting/editing features to a document.
a. Insert and delete columns and rows in a table-
1. To insert column/row to table, place cursor to location where user want
to add new row/column.
11. Select the relevant menu option or right click in the table. Choose relevant
option to insert rows/columns.
111. To delete column/row in a table, place cursor to location where user want to
delete existing row/column.
1v. Select the relevant menu option or right click in the table. Choose relevant
option to delete rows/columns.
b. Split a cell in a table-
1. Place cursor in the cell which is to be split.
11. Select the relevant menu option or right click in the table.
111. Choose the relevant option to split the cell.
iv. Specify number of rows/columns to which this cell is to be spitted. Press OK.
c. Merge cells in a table-
1. Select the number of cells to be merge by dragging mouse.
11. Select the relevant menu option or right click in the table.
111. Choose the relevant option to merge the cells.
iv. Choose merge option.
d. Repeating columns heading to each page-
1. Click in the table row to be repeated on each page.
ii. Choose relevant option from menu to repeat it.
e. Use border and shading in table-
1. Click anywhere in the table.
11. Choose relevant option from menu or right click the mouse.
111. Choose relevant option for making/changing the table border.
II Exercise
1. Write steps to repeat heading row on each page when a table is spread on two
or more pages.
2. Insert a table with 5 rows and 5 columns and make row height as 15 and
Column width as 20.
3. Insert a table with having predefined colors to the cells.

Assignment:

Create table as below and shading the first row. Insert an Octagon and write your name in the center

➢ Create margin at the top & bottom 1.1 inch and right & left 1.5 inch
➢ Create landscape orientation & A4 paper size
➢ Insert Period III column after Period II
➢ Insert Thursday row bellow Wednesday row
➢ Insert page number center align and Arial font
➢ Insert watermark "Hello world"
IT & ITES Exercise 2.4
COPA - Word Processing Software

Mail merge using MS word


Objectives: At the end of this exercise you shall be able to
• create a form letter
• type list of recipients and edit recipients list
• use mail merge to personalize letters for bulk mailings.

Requirements
Tools/Equipments/Instruments
A working PC with windows OS
- 1 No.

PROCEDURE

1. Create a letter with mail merge option:


a. Prepare Document- Type the body of the letter in the document.
b. Prepare mailing list- create mailing list during mail merge.
c. Enter data in required field in the list.
d. Open existing letter. Keep the cursor at location where data need to be
merged. Where ever required click on that location and insert merge
field.
e. Select Recipients.
f. Preview your letters-To see the data from database into a document.
g. Complete the Merge.
h. Save the Merged Letters.

II Exercise

1. Create a formal letter of invitation and add 10 recipient names in it.


2. Create a normal certificate of appreciation and add 5 students name on it.
Exercise - Mail Merge (Letters)

1. Open your word processing application and type the following letter on a new
blank page.

12 George Street
Sydney NSW 2000

Dear Participant

As you may be aware we have been running a variety of courses at the college ranging from 1 week to 12
weeks. We are now happy to inform you that we are introducing a number of 2-day courses, which will be
held both at weekends and mid-week to suit the varying needs of potential students.

Please find enclosed an application form and a program schedule. We look forwardto your participation.

Yours truly,

Morgan Reilly Course Director

1. Save the letter as Course Letter.


2. Open a new blank document and create the table below.
TITLE FIRST_NAME SURNAME ADDRESS_1 ADDRESS_2 CITY
Mrs Mary Collins 10 Bally Rd Bondi Sydney
Mr Tom Thompson 15 Bondi Rd Coogee Sydney
Ms Roberta Reynolds 85 Oxford Maroubra Sydney
Street
Mr Scott Brooke 45 Scott Rd Randwick Sydney
Ms George Stephens 34 George Bondi Sydney
Street
Mr Frank Hunter 23 Mullins Tamworth NSW
Rd
Mrs Shiela Goddins 45 Llandaff Rushcutters Sydney
Rd Bay

3. Save the file as Course_Participant_Data.


4. Close the document.
5. Using the current document Course Letter as a form letter and the
Course_Participants_Data as the data source merge the two documents and insert
the merged fields Title, First_Name, Surname, Address and City fields above Dear
Participant in the letter, as shown below.

<<Title>> <<First_Name>> <<Surname>>


<<Address_1>>
<<Address_2>>
<<City>>

Dear Participant

6. Save the mail merge document as Course2014.doc.


7. Save and close all open documents.
lOMoAR cPSD| 32699710

lOMoAR cPSD| 32699710

Sample Exercises

1. Create and Design Admission/Enquiry Forms etc. See


a sample in the image below.
lOMoAR cPSD| 32699710

2. Create bills/leaflets/brochures. See the sample below.


lOMoAR cPSD| 32699710

3. Design E-book cover pages / Magazine front/ books


front/back page using cover page option in Insert Menu.
lOMoAR cPSD| 32699710

4. Create Business Cards using Shapes, text, and colors.

5. Use smart art and create organization charts


IT & ITES Exercise
COPA - Spreadsheet Application
Create Save and Formatting Excel Sheet
Objectives: At the end of this exercise you shall be able to

• Create, edit and save spreadsheets by way of entering the given sample data and performing basic
calculations on it.
• Format data and sheet layout, adjust row height and column width.
• Insert and delete cells, rows and columns
• Apply wrap text, text orientation feature on cell

Requirements

Tools/Equipments/Instruments
A working PC with MS Office - 1 No./batch.

I Procedure
a. Create and save Spreadsheets:
Use appropriate tool from the menu/ ribbon/using short cut keys to perform following
tasks:
a. Enter sample data as instructed.
b. Save the worksheet.
c. Close and open workbook.

b. Edit Spreadsheets:
a. By keeping mouse on the boundary line of row/column and dragging the line user can
adjust row height and column width.
b. One can use all the word processing features to format/edit text data.
Use it to format font, delete, move data, Copy and Paste, Find and Replace, Spell Check,
Zoom In-Out, insert Special Symbols, Insert Comments, Add Text Box, and Undo
Changes.
c. Use relevant options from the menu to perform following tasks:
Rotate Cells, Set Text Alignments, Merge and Wrap cell, apply Borders and Shades, Set
Background, Clear formatting, setting line spacing.
Adjust page Margins, and Page Orientation, add/remove Header and Footer, Insert Page
Breaks.
d. To hide/unhide rows/columns-
1. Click on the column/row designation number on the top/right to select whole
column/row.
11. Use relevant menu or right click the mouse button and choose Hide to hide the
column/row.
111. To unhide the hidden column, choose two successive column/rows between which
the hidden column/row exists.
1v. Use relevant menu option or right click the muse button and choose Unhide to
unhide the hidden column/row.
e. To Freeze Panes-
1. Place cursor to a cell for reference point. Use relevant menu and choose freeze option
to freeze the column to left and rows above the cell made as reference point. This will
keep freezing while scrolling the sheet vertically/horizontally.
11. To unfreeze it, choose the unfreeze option from the relevant menu.
f. To insert rows and columns in between the existing rows/columns-
1. Keep cursor to a cell where user wants to insert new row/column.
11. Choose relevant menu option or right click the mouse button.
111. Choose entire row/entire column option.
II Exercise

a. Create a worksheet, enter 10 different values in different cells and perform addition of
them.
b. Create a worksheet and assign various data type from available menu.

Poonam R.Gaikwad (Craft Instructor COPA)


IIT & ITES Exercise
COPA - Spreadsheet Application
Practice Excel Functions in all major categories
Objectives: At the end of this exercise you shall be able to
• wok with Mathematical and Statistical Functions
• work with date and time Functions
• practice on Financial Functions
• work with Text based Functions
• logical function to arrive a decision.

Requirements

Tools/Equipments/Instruments
A working PC with MS Office - 1 No./batch.

PROCEDURE

1. Work with Formula:


a. Select the cell to enter the formula in.
b. Type an equal sign in the cell to begin formula.
c. Type an open parenthesis if necessary.
d. Create a cell reference.
e. Enter a mathematical, comparison, text, or reference operator as required.
Close parenthesis for each open parenthesis

2. Writing a function:
a. Select the cell to enter the function.
b. Type an equal sign to enter a function.
c. Type the complete function with necessary parameters by following its syntax.
d. Press Enter key.
Alternate way is as follows:
a. Click the relevant button provided to insert function.
b. Select a function from a category.
c. Refer cells to enter necessary arguments.
d. Click OK.
3. Writing IF function:
a. Type =if
b. Add open brackets
c. Type the conditional statement followed by a comma.
d. Type the value/formula if the condition written in the conditional statement is
satisfied, followed by a comma.
e. Type the value/formula if the condition written in the conditional statement is
unsatisfied.
f. Close the brackets.
g. Press Enter key.

I Exercise
a. Create a worksheet to demonstrate result of 10 students.
b. Create a worksheet to demonstrate use of if statement.
c. Make a new worksheet to demonstrate use of any 5 mathematical functions.

Poonam R.Gaikwad (Craft Instructor COPA)


IIT & ITES Exercise
COPA - Spreadsheet Application
Perform Sort, Filter and Validity data in MS Excel 2010
Objectives: At the end of this exercise you shall be able to
• sort the data in a Table
filter the data under certain conditions

Requirements

Tools/Equipments/Instruments
A working PC with MS Office - 1 No./batch.

PROCEDURE

I Procedure
1. Data Sorting:
a. Select the cell range to sort.
b. Select the relevant option to activate Sort command.
c. The Sort dialog box will appear.
d. Decide the sorting order (either ascending or descending).
e. Once satisfied with selection, click OK.
f. The cell range will be sorted by the selected column.

2. Filter a range of data


a. Select the relevant option to activate Filter command. A drop-down arrow will appear
in the header cell for each column.
b. Click the drop-down arrow for the column to be filter.
c. The Filter menu will appear.
d. Select/specify filter criteria.
e. When done, click OK.
f. The worksheet data will be filtered according to search term.

1. Conditional formatting
a. Select the cells to apply conditional formatting.
b. On the relevant tab/menu, click the option related to Conditional Formatting.
c. Select the type of criterion to be use.
d. Enter the values for reference in the text box.
e. Click the relevant options and select the desired formatting.
f. Click OK.

2. Data Validation:
a. Select cell to enter the data.
b. On the relevant menu choose option for Validation.
c. On the Settings tab choose the "custom" option.
d. Specify/choose the relevant validation conditions for preventing duplicate data/restrict
the data to a given range/no leading or trailing space/ no blank cells.
Click OK when done

II Exercise
d. Create a worksheet to demonstrate result of 10 students.
e. Create a worksheet to demonstrate use of if statement.
f. Make a new worksheet to demonstrate use of any 5 mathematical functions.

Poonam R.Gaikwad (Craft Instructor COPA)


IT & ITES Exercise
COPA - Spreadsheet Application

Create and Format various Static and dynamic charts in Excel 2010
Objectives : At the end of this exercise you shall be able to
• create a chart using given data
• make a static chart with Fixed values of table
• create a dynamic chart with updatable values of table.

Requirements

Tools/Equipments/Instruments
A working PC - 1 No./batch.

PROCEDURE

1. Create a Chart:
a. On the worksheet, arrange the data that is to be plot in a chart.
b. Select the cells that contain the data to be use for the chart
c. On the relevant menu/option click the chart type, and then a chart subtype.
d. By default, the chart is placed on the worksheet as an embedded chart. If user want to
place the chart in a separate chart sheet, one can change its location by doing the
following:
i. Click anywhere in the embedded chart to activate it.
ii. Using the relevant option user can place the chart to new location i.e. new sheet.

2. Edit Chart
a. Apply a predefined chart layout
i. Click anywhere in the chart that user want to format by using a predefined chart
layout.
ii. This displays different Chart Tools.
iii. Choose relevant tool to activate the Chart Layouts , click the chart layout that user
want to use.

b. Apply a predefined chart style


i. Click anywhere in the chart to format by using a predefined chart style.
ii. Using the relevant option, choose the chart style that user want to use.

c. Change the format of chart elements


i. Click the chart element for which user want to change the layout.
ii. Click anywhere in the chart to display the Chart Tools.
iii. Using relevant tool click the chart element such as Labels, Axes,
or Background then choose the layout option that user want.
iv. To format the shape of a selected chart element such as Shape Fill, Shape Outline,
or Shape Effects, chooses the formatting options.

d. Add chart and axis titles and data labels


Add a chart title
i. Click anywhere in the chart to which user want to add a title.
ii. Using the relevant option change the Chart Title.
iii. To format the text, select it, and then click the formatting options as per
requirement.

Poonam R.Gaikwad (Craft Instructor COPA)


Add axis titles
i. Click anywhere in the chart to which axis titles to be added.
ii. Choose relevant option/tool to change Axis Titles of Primary Horizontal Axis Title/
Primary Vertical Axis Title.

Add data labels


i. To add a data label to all data points of all data series, click the chart area.
ii. To add a data label to all data points of a data series, click anywhere in the data
senes.
iii. To add a data label to a single data point in a data series, click the data series that
contains the data point that user want to label, and then click the data point that user
want to label.
iv. Using relevant tool choose Data Labels, and then click the display option.

e. Show or hide a legend


When one create a chart, the legend appears, but user can hide the legend or change
its location after creating the chart.
i. Click the chart where legend needs to be shown or hidden.
ii. Using relevant option click Legend.
iii. Do one of the following:
iv. To hide the legend, click None.
v. To display a legend, click the display option.

f. Display or hide chart axes or gridlines


i. Click the chart where one need to display or hide axes.
ii. To display an axis, click Primary Horizontal Axis or Primary Vertical Axis.
iii. To specify detailed axis display and scaling options, click the Primary Horizontal
Axis, Primary Vertical Axis and choose relevant option from the available options.

g. Display or hide gridlines


i. Click the chart to display or hide chart gridlines.
ii. Choose relevant option of the the Axes and choose Gridlines.
iii. To add horizontal gridlines to the chart, point to Primary Horizontal Gridlines. If
the chart has a secondary horizontal axis, one can also click Secondary Horizontal
Gridlines.
iv. To add vertical gridlines to the chart, point to Primary Vertical Gridlines, and
then click the option as per requirement. If the chart has a secondary vertical axis,
one can also click Secondary Vertical Gridlines.
v. To hide chart gridlines, point to Primary Horizontal Gridlines, Primary Vertical
Gridlines, and then click None.
vi. To quickly remove chart gridlines, select them, and then press DELETE.

3. Move or resize a chart


One can move a chart to any location on a worksheet or to a new or existing worksheet, also
change the size of the chart for a better fit.
i. To move a chart, drag it to the desired location.
ii. To resize a chart, Click the chart, and then drag the sizing handles to the desirable size.

II Exercise
1. Prepare a dummy worksheet and draw pie chart for it.
2. Prepare a worksheet containing your marks in class test and prepare a Subject wise bar
chart.

Poonam R.Gaikwad (Craft Instructor COPA)


IT & ITES Exercise
COPA - Spreadsheet Application

Perform data analysis using Pivot Table, Chart and Macros


Objectives : At the end of this exercise you shall be able to
• practice on pivot table and chart
• crreat a Macro and run

Requirements

Tools/Equipments/Instruments
A working PC - 1 No./batch.

TASK 1 : Practice on pivot table and chart


1 Open a new file and enter the data's in the subse-
quent cells as shown in Fig 1.

Poonam R.Gaikwad (Craft Instructor COPA)


Step 1: Prepare Your Data

Make sure your data is organized in a tabular format with headers. Each column should have a unique header,
and there should be no blank rows or columns within your data set.

Step 2: Select Your Data

1. Click on any cell within your data set.

2. Press `Ctrl` + `A` to select the entire data set.

Step 3: Insert Pivot Table

1. Go to the "Insert" tab in the Excel ribbon.

2. Click on "PivotTable." This will open the Create PivotTable dialog box.

Step 4: Choose Your Data Range

1. In the Create PivotTable dialog box, ensure that the Table/Range field displays the correct range of your data.

2. Choose where you want to place your PivotTable:


- New Worksheet: To place the PivotTable in a new worksheet.
- Existing Worksheet: To place the PivotTable in an existing worksheet. Specify the location by clicking on the
location field and selecting a cell.

3. Click "OK."

Step 5: Design Your Pivot Table

1. In the PivotTable Field List on the right, you will see a list of your column headers.

2. Drag the fields you want to analyze into the areas below:
- "Values": This is where you put the numerical data you want to analyze (e.g., sum of sales).
- "Rows": This is where you put the categorical data you want to break down (e.g., product names).
- "Columns": This is where you put additional categorical data (e.g., regions).

3. You can also drag fields into the "Filters" area to filter your data.

Step 6: Customize Your Pivot Table

1. You can format the values in the Values area by clicking the drop-down arrow and selecting "Value Field
Settings."

2. You can also customize the appearance of your PivotTable by right-clicking on various elements and using the
context menu.

Step 7: Refresh Your Pivot Table (if needed)

If your source data changes, you might need to refresh your PivotTable. Right-click on the PivotTable and choose
"Refresh."

Poonam R.Gaikwad (Craft Instructor COPA)


TASK 2: Practice on Micro

Step 1: Enable Developer Tab

1. Go to the "File" tab.

2. Click on "Options" at the bottom of the left-hand menu.

3. In the Excel Options dialog box, select "Customize Ribbon."

4. Check the "Developer" option in the right-hand column.

5. Click "OK" to close the Excel Options dialog box.

Step 2: Open the Developer Tab

1. The "Developer" tab should now appear on the Excel ribbon. Click on it to open the tab.

Step 3: Record a Macro

1. On the Developer tab, click "Record Macro." The Record Macro dialog box will appear.

2. Enter a name for your macro in the "Macro name" field. Avoid using spaces or special characters.

3. Optionally, you can assign your macro to a shortcut key or place it in a specific location.

4. Choose where to store the macro:


- "This Workbook": Available in the current workbook only.
- "New Workbook": Available in new workbooks.

5. Click "OK" to start recording.

Step 4: Perform Actions to Record

Now, Excel is recording your actions. Perform the actions you want to automate:

- Formatting cells.
- Entering data.
- Inserting or deleting rows/columns.
- Any other actions you want to automate.

Step 5: Stop Recording

1. Once you've completed the actions, go back to the Developer tab.

2. Click "Stop Recording" in the Code group.

Step 6: Run the Macro

Now that you've recorded a macro, you can run it:

1. Go to the Developer tab.

2. Click "Macros" in the Code group.

Poonam R.Gaikwad (Craft Instructor COPA)


3. Select the macro you created.

4. Click "Run."

Step 7: Save Your Workbook

To ensure that your macro is saved with your workbook:

1. Save your workbook in a macro-enabled format (.xlsm).

- Choose "File" > "Save As."

- Select a location.

- Choose "Excel Macro-Enabled Workbook (*.xlsm)" as the file type.

2. Click "Save."

Step 8: Test Your Macro

Close and reopen your workbook, then run the macro again to ensure it works as expected.

Poonam R.Gaikwad (Craft Instructor COPA)


IT & ITES Exercise
COPA - Spreadsheet Application
Page setup and printing in Excel Worksheet

Objectives: At the end of this exercise you shall be able to


• prepare an existing table to printing setup
• working with printing screen options and print the given Excel sheet

Requirements

Tools/Equipments/Instruments
A working PC - 1 No./batch.

I Procedure
Page setting allows user to specifically configure and control many issues related to printing.
User can have various options, using the relevant Menu/Ribbon for the Page Setup.
1. First set the print range/print area.
2. On the Ribbon/menu related to print, Select Page Layout and use the options available
for the Page Setup.
3. Choose the option for scaling the page.
4. Select paper size.
5. Set the top, bottom, left and right page margins.
6. Type header/footer if needed.
7. Choose various options related to sheet-
a. Choose the row(s) to be repeated on top of every page.
b. Choose column(s) to be repeated at left of every page.
c. Select the options to include/exclude gridlines on sheet.
d. Select the desired page order.
8. Once all settings are done, click on "print preview" to see and check the settings applied.
If settings are as per plan/instructions, click on "print"/" OK" button to get the print on
paper ,otherwise go for modifying/applying desired print settings as per instructions.

II Exercise

 Scale the current view of Spreadsheet to 75%


 Select 10 rows and set them as "Print Area".

Poonam R.Gaikwad (Craft Instructor COPA)


IIT & ITES Exercise
COPA – Powerpoint Application
Perform Slide Presentations in MS Powerpoint 2010
Objectives: At the end of this exercise you shall be able to
• Create, edit and save presentations by way of hands on to compose the given sample presentations as per
given design specifications.
• Apply formatting features to the slides.

Requirements

Tools/Equipments/Instruments
A working PC with MS Office - 1 No./batch.

PROCEDURE

1. On the relevant menu choose option for Validation. Create a new presentation.
a. Once users open the presentation software a new blank slide is open with default
design/layout.
b. Alternatively a new slide is added by choosing the relevant menu/option and choosing
from the available layout/design.
c. In the blank slide use relevant menu/ short cut keys to insert and place text box on the
slide to insert and edit text. User can perform all word processing related tasks on text.
d. Insert some sample text and format it.
e. Add few more slides.

2. Add pictures in the presentation:


a. Go to slide where picture is to be inserted.
b. Go to relevant menu to insert picture.
c. Choose the folder where file is located.
d. Select the file.
e. Insert the file into presentation.
f. Once picture is inserted to slide, it can be formatted in many ways.
g. Click the image on slide. Choose relevant menu to format/edit the image or press right
click button to activate various image formatting/editing options like setting brightness,
contrast, transparency, cropping the image.
h. One can also insert shapes and clipart from relevant menu/option.
1. After clicking on image/graphic object, use handles on the border of image to set its size
or drag it to change its place on the slide.
J. Go to relevant menu to view the presentation.
k. Using view option user can change the slide sequence by choosing slide sorter option and
dragging the slide and dropping it to new location in the sequence. Slide master option is
use to insert a piece of text/image to make it appear on every slide.
1. Go to relevant menu to change a slide layout, apply a theme, and change background color.
m. Add new slides and insert more text/images/shapes from the relevant menu. Format and
place it and complete the presentation.
e.
f. On the Settings tab choose the "custom" option.
g. Specify/choose the relevant validation conditions for preventing duplicate data/restrict
the data to a given range/no leading or trailing space/ no blank cells.
Click OK when done

Poonam R.Gaikwad (Craft Instructor COPA)


III Exercise

1 Prepare a simple slide show of 5 slides displaying your name, middle name, surname,
branch, and college name.
2 Prepare a simple slide show of 3 Slide displaying various cartoon characters.

Poonam R.Gaikwad (Craft Instructor COPA)


IIT & ITES Exercise
COPA – Powerpoint Application
Perform Slide Presentation Using Tables and Charts in MS Powerpoint
2010
Objectives: At the end of this exercise you shall be able to
• Add tables and charts in the slides and manage it.
• Run slide presentation in different modes.

Requirements

Tools/Equipments/Instruments
A working PC with MS Office - 1 No./batch.

PROCEDURE

Create a new presentation, Use relevant tool from the menu/ using short cut keys to perform
following tasks:

1. Create and format a table in presentation


a. Select the slide to add a table.
b. From the relevant menu, select Table.
c. Specify the number of rows and columns.
d. To add text to the table cells, click a cell, and then enter text.

2. Create a charts in a presentation


a. Using the relevant menu ribbon, select the Chart option.
b. Select the type of chart from the different chart types.
c. Modify a Chart: To change the type of chart then select the chart and use relevant option
to choose the new chart type.
d. To format the charts layout styles, then select the relevant option.

3. Print slide presentation as handouts


a. Go to Print Menu
b. From the print option choose handouts.
c. Specify the number of slides per page.
d. Specify the order of slides.
e. Click on printlok button.

II Exercise

1. Prepare a slide show and add chart showing in gender specific population of your class.
2. Create a chart in slide show depicting your earlier semester's marks in bar chart

Poonam R.Gaikwad (Craft Instructor COPA)


ITES Exercise
COPA – Powerpoint Application
Animation Effects to Text and Slides in MS Powerpoint 2010
Objectives: At the end of this exercise you shall be able to
• Add slides with different animation effects during slide transition.
• Add different animation effects on text and other objects and control the same.

Requirements

Tools/Equipments/Instruments
A working PC with MS Office - 1 No./batch.

PROCEDURE

Create a new presentation, Use relevant tool from the menu/ using short cut keys to perform
following tasks:
1. To add animation to text or an object, do the following:
a. Select the text or object that is to be animate.
b. On the relevant menu, click custom animation.
c. Choose an animation effect, apply from different given effects.
d. Control its appearance and speed by choosing relevant options.
To alter the animation effect-
1. Select the text/object.
11. Remove the applied effect with its settings.
111. Select the new effect and then click the type of animation.
1v. Control its appearance and speed by choosing relevant options.

2. To add slide transition effect, do the following:


a. Go to slide to which transition effect is to be applied.
b. Go to relevant menu to choose the transition effect.
Once an effect is selected, choose from different options to control its appearance and speed

III Exercise

1. Prepare a slide show and apply any five transitions to object on entry.
2. Prepare a slide show and apply any five transitions to object on emphasis.
3. Prepare a slide show and apply any five transitions to object on exit.

Poonam R.Gaikwad (Craft Instructor COPA)


ITES Exercise
COPA – Powerpoint Application
Audio and Video Files Presentation in MS Powerpoint 2010
Objectives: At the end of this exercise you shall be able to
• Add appropriate audio and videos suitable to the presentation.
• Follow ethical practices by providing citation to the audios and videos used in slide(s).

Requirements

Tools/Equipments/Instruments
A working PC with MS Office - 1 No./batch.

PROCEDURE

Following activities are to be carried using identified software package.


Create a new presentation, use relevant tool from the menu/using short cut keys to perform
following tasks:
1. To Add audio/videos clips in the presentation:
There are two different ways to insert an audio file.
a. from a file stored on computer or a disk;
b. from clip organizer
2. To insert an audio/video from file:
a. Go to slide where clip is to be inserted.
b. Go to relevant menu to insert audio/video clip.
c. Choose the location where file is located.
d. Select the file.
e. Insert the file into presentation.
f. Once inserted it can be controlled in many ways by choosing the relevant options to
play it and setting its properties.

II Exercise

1. Prepare a new presentation and add audio on 5t Slide.


2. Prepare a new presentation; name the file as "My Video". Add video on 6th Slide suitable
to the presentation theme.

Poonam R.Gaikwad (Craft Instructor COPA)


Excel Exercises
Exercise 1
Objectives:

🞂 Introduction to MS Excel files, Workbooks, Worksheets, Columns and Rows.


🞂 Formatting Worksheets.
🞂 AutoFill, Numeric formats, previewing worksheets.

1. Open a new workbook and save the file with the name “Payroll”.
2. Enter the labels and values in the exact cells locations as desired.
3. Use AutoFill to put the Employee Numbers into cells A6:A8.
4. Set the columns width and rows height appropriately.
5. Set labels alignment appropriately.
6. Use warp text and merge cells as desired.
7. Apply borders, gridlines and shading to the table as desired.
8. Format cell B2 to Short Date format.
9. Format cells E4:G8 to include dollar sign with two decimal places.
10. Calculate the Gross Pay for employee; enter a formula in cell E4 to multiply Hourly
Rate by Hours Worked.
11. Calculate the Social Security Tax (S.S Tax), which is 6% of the Gross Pay; enter a
formula in cell F4 to multiply Gross Pay by 6%.
12. Calculate the Net Pay; enter a formula in cell G4 to subtract Social Security Tax from
Gross Pay.
13. Set the work sheet vertically and horizontally on the page.
14. Save your work.

2|Page
Exercise 2
Objectives:

🞂 Using Formulas.
🞂 Header and Footers.

1. Open a new workbook and save the file with the name “Call Statistics”.
2. Delete Sheet 2 & 3, and rename Sheet 1 to (Call Statistics).
3. Enter the labels and values in the exact cells locations as desired.
4. Set the row height of rows 1 & 3 to size 30; and rows 4 until 10 to size 20.
5. Set labels alignment appropriately.
6. Use Warp Text, Orientation and merge cells as desired.
7. Apply border, gridlines and shading to the table as desired.
8. Format column E to include euro (€) sign with two decimal places.
9. Format cell B12 to include % sign with 0 Decimal places.
10. Calculate the Calls per Hour, enter a formula in cell D4 to divide numbers of calls by
Hours worked. Using AutoFill, copy the formula to the remaining cells.
11. Calculate the Bonus. Enter a formula in cell E4 to multiply ‘Calls per Hours’ by the
fixed Bonus Rate in cell B12. Using AutoFill, copy the formula to the remaining cells.
12. Calculate the ‘TOTAL’.
13. Set the worksheet vertically and horizontally on the page.
14. Create a header that includes your name in the left section, and your ID number in
the right section. Create the footer that includes the current Date in the center.

3|Page
Exercise 3
Objectives:

🞂 Number, Commas and Decimal numeric formats.


🞂 Working with Formulas (Maximum, Minimum, Average, Count and Sum).
🞂 Percentage Numeric Formats.

15. Create the worksheet shown above.


16. Set the column widths as follows: Column A: 8, Column B: 14, Columns C & D: 15,
Columns E & F: 14.
17. Enter the formula to find COMMISSION for the first employee.
The commission rate is 2% of sales, COMMISSION = SALES * 2%
Copy the formula to the remaining employees.
18. Enter the formula to find TOTAL SALARY for the first employee where:
TOTAL SALARY = SALARY + COMMISSION
Copy the formula to the remaining employees.
19. Enter formula to find TOTALS, AVERAGE, HIGHEST, LOWEST, and COUNT values.
Copy the formula to each column.
20. Format numeric data to include commas and two decimal places.
21. Align all column title labels horizontally and vertically at the center.
22. Create a Header that includes your name in the left section, page number in the
center section, and your ID number in the right section.
23. Create footer with DATE in the left section and TIME in the right section.
24. Save the file with name Exercise 3.

4|Page
Exercise 4
Objectives:

🞂 Working with the IF Statement.

For the above table find the following:

25. TAX (If ITEM PRICE is less than 100, TAX is 50, otherwise it should be 100).
26. TOTAL PRICE BEFORE TAX =NO. OF ITEMS * ITEM PRICE.
27. TOTAL PRICE AFTER TAX = TOTAL PRICE BEFORE TAX + TAX.
28. RATE (If TOTAL PRICE AFTER TAX > 3500 then the rate is “HIGH”, otherwise it is
REASONABLE.
29. Find Count of Items, Average of Taxes, Min Item PRICE and Max Item PRICE.
30. Save file as Exercise 4.

5|Page
Exercise 5
Objectives:

 Working with Sum IF and Count IF statements.


 Inserting Charts.

1. Create the worksheet shown above.


2. Set the Text alignment, Columns width and high appropriately.
3. Use AutoFill to put the Series Numbers into cells A5:A7.
4. Format cells C3:G7, C8:E11, C13:E13 to include dollar sign with two decimal places.
5. Find the Average Sales and Maximum Sales for each City.
6. Find the Total Sales for each Month.
7. Calculate the Profit for each month , where profit = Total Sales – Cost
8. Calculate the 10% Bonus, which is 10% of the Profit.
9. Find the Total Sales for each Month; only for sales greater than 30,000.
10. Find the No of Sales for each Month; only for sales greater than 30,000.
11. Create the following Charts:

6|Page
Exercise 6
Objectives:

 Working with Sum IF and Count IF statements.


 Inserting Charts.

1. Open a new workbook and create the above worksheet.


2. Make sure that your worksheet looks like the picture (Alignment, Shedding,
Borders, Wrap text, Orientation …).
3. Find the entire customer IDs.
4. Format Colum E & D to Currency with dollar sign and two decimal places.
5. Find the Total Annual Purchases for each City.

7|Page
6. Find the Average Annual Purchases for each Education.
7. Find the total number of customers from each gender.
8. Find the total annual salary for each gender in each city.
9. Create the following Chart:

8|Page
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

LIST OF EXPERIMENTS
Course Title: SQL (Structured Query Language)

S.No Name of the Experiment Page No

Implementation of DDL commands of SQL with suitable examples

6.1  Create table


 Alter table
 Drop Table
Implementation of DML commands of SQL with suitable examples

6.2  Insert
 Update
 Delete
Implementation of different types of function with suitable examples
 Number function
6.3  Aggregate Function
 Character Function
 Conversion Function
 Date Function
Implementation of different types of operators in SQL
 Arithmetic Operators
6.4  Logical Operators
 Comparison Operator
 Special Operator
 Set Operation
Implementation of different types of Joins

6.5  Inner Join


 Outer Join
 Natural Join etc..
Study and Implementation of

6.6  Group By & having clause


 Order by clause
 Indexing

6.7 Study & Implementation of different types of constraints.

Study & Implementation of Database Backup & Recovery


6.8
commands.Study & Implementation of Rollback, Commit,
Savepoint.

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

Experiment No: 6.1


Title: Implementation of DDL commands of SQL with suitable examples
 Create table
 Alter table
 Drop Table

Objective:
 To understand the different issues involved in the design and implementation of
a database system
 To understand and use data definition language to write query for a database
Theory:

There are five types of SQL statements. They are:

1. DATA DEFINITION LANGUAGE (DDL)

2. DATA MANIPULATION LANGUAGE (DML)

3. DATA RETRIEVAL LANGUAGE (DRL)

4. TRANSATIONAL CONTROL LANGUAGE (TCL)

5. DATA CONTROL LANGUAGE (DCL)

1. DATA DEFINITION LANGUAGE (DDL): The Data Definition Language (DDL) is


used to create and destroy databases and database objects. These commands will primarily be
used by database administrators during the setup and removal phases of a database project.
Let's take a look at the structure and usage of four basic DDL commands:
1. CREATE 2. ALTER 3. DROP 4. RENAME

1. CREATE:
(a)CREATE TABLE: This is used to create a new relation (table)

Syntax: CREATE TABLE <relation_name/table_name >


(field_1 data_type(size),field_2 data_type(size), .. . );
Example:
SQL> CREATE TABLE Student (sno NUMBER (3), sname CHAR (10), class CHAR (5));

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

2. ALTER:
(a) ALTER TABLE ...ADD...: This is used to add some extra fields into existing
relation.

Syntax: ALTER TABLE relation_name ADD (new field_1 data_type(size), new field_2
data_type(size),..);
Example: SQL>ALTER TABLE std ADD (Address CHAR(10));

(b) ALTER TABLE...MODIFY...: This is used to change the width as well as data
type of fields of existing relations.

Syntax: ALTER TABLE relation_name MODIFY (field_1 newdata_type(Size), field_2


newdata_type(Size),... field_newdata_type(Size));

Example:SQL>ALTER TABLE student MODIFY(sname VARCHAR(10),class


VARCHAR(5));

c) ALTER TABLE..DROP ..... This is used to remove any field of existing relations.

Syntax: ALTER TABLE relation_name DROP COLUMN (field_name);

Example:SQL>ALTER TABLE student DROP column (sname);

d) ALTER TABLE..RENAME...: This is used to change the name of fields in


existing relations.

Syntax: ALTER TABLE relation_name RENAME COLUMN (OLD field_name) to


(NEW field_name);

Example: SQL>ALTER TABLE student RENAME COLUMN sname to stu_name;

3. DROP TABLE: This is used to delete the structure of a relation. It permanently deletes
the records in the table.
Syntax: DROP TABLE relation_name;
Example: SQL>DROP TABLE std;

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

4. RENAME: It is used to modify the name of the existing database object.


Syntax: RENAME TABLE old_relation_name TO new_relation_name;
Example: SQL>RENAME TABLE std TO std1;

LAB PRACTICE ASSIGNMENT:

1. Create a table EMPLOYEE with following schema:

(Emp_no, E_name, E_address, E_ph_no, Dept_no, Dept_name,Job_id , Salary)


2. Add a new column; HIREDATE to the existing relation.
3. Change the datatype of JOB_ID from char to varchar2.
4. Change the name of column/field Emp_no to E_no.
5. Modify the column width of the job field of emp table

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

Experiment No:6.2

Title : Implementation of DML commands of SQL with suitable examples


 Insert table
 Update table
 Delete Table

Objective :
To understand the different issues involved in the design and implementation of a
database system
To understand and use data manipulation language to query, update, and manage a
database

Theory :

DATA MANIPULATION LANGUAGE (DML): The Data Manipulation Language


(DML) is used to retrieve, insert and modify database information. These commands will be
used by all database users during the routine operation of the database. Let's take a brief look
at the basic DML commands:
1. INSERT 2. UPDATE 3. DELETE
1. INSERT INTO: This is used to add records into a relation. These are three type of
INSERT INTO queries which are as
a) Inserting a single record
Syntax: INSERT INTO < relation/table name> (field_1,field_2……field_n)VALUES
(data_1,data_2, ....... data_n);
Example: SQL>INSERT INTO student(sno,sname,class,address)VALUES
(1,‟Ravi‟,‟M.Tech‟,‟Palakol‟);
b) Inserting a single record
Syntax: INSERT INTO < relation/table name>VALUES (data_1,data_2, ........data_n);
Example: SQL>INSERT INTO student VALUES (1,‟Ravi‟,‟M.Tech‟,‟Palakol‟);

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

c) Inserting all records from another relation


Syntax: INSERT INTO relation_name_1 SELECT Field_1,field_2,field_n
FROM relation_name_2 WHERE field_x=data;
Example: SQL>INSERT INTO std SELECT sno,sname FROM student
WHERE name = „Ramu„;

d) Inserting multiple records


Syntax: INSERT INTO relation_name field_1,field_2, .... field_n) VALUES
(&data_1,&data_2, ....... &data_n);
Example: SQL>INSERT INTO student (sno, sname, class,address)
VALUES (&sno,‟&sname‟,‟&class‟,‟&address‟);
Enter value for sno: 101
Enter value for name: Ravi
Enter value for class: M.Tech
Enter value for name: Palakol

2. UPDATE-SET-WHERE: This is used to update the content of a record in a relation.


Syntax: SQL>UPDATE relation name SET Field_name1=data,field_name2=data,
WHERE field_name=data;
Example: SQL>UPDATE student SET sname = „kumar‟ WHERE sno=1;

3. DELETE-FROM: This is used to delete all the records of a relation but it will retain the
structure of that relation.
a) DELETE-FROM: This is used to delete all the records of relation.
Syntax: SQL>DELETE FROM relation_name;
Example: SQL>DELETE FROM std;
b) DELETE -FROM-WHERE: This is used to delete a selected record from a relation.
Syntax: SQL>DELETE FROM relation_name WHERE condition;
Example: SQL>DELETE FROM student WHERE sno = 2;

5. TRUNCATE: This command will remove the data permanently. But structure will not be
removed.

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

Difference between Truncate & Delete:-


 By using truncate command data will be removed permanently & will not get back
where as by using delete command data will be removed temporally & get back by
using roll back command.
 By using delete command data will be removed based on the condition where as by
using truncate command there is no condition.
 Truncate is a DDL command & delete is a DML command.

Syntax: TRUNCATE TABLE <Table name>


Example TRUNCATE TABLE student;

 To Retrieve data from one or more tables.

1. SELECT FROM: To display all fields for all records.


Syntax : SELECT * FROM relation_name;
Example : SQL> select * from dept;
DEPTNO DNAME LOC
-------- ----------- ----------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON

2. SELECT FROM: To display a set of fields for all records of relation.


Syntax: SELECT a set of fields FROM relation_name;
Example: SQL> select deptno, dname from dept;
DEPTNO DNAME

10 ACCOUNTING
20 RESEARCH
30 SALES
3. SELECT - FROM -WHERE: This query is used to display a selected set of fields for a
selected set of records of a relation.

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

Syntax: SELECT a set of fields FROM relation_name WHERE condition;


Example: SQL> select * FROM dept WHERE deptno<=20;
DEPTNO DNAME LOC
------ ----------- ------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS

LAB PRACTICE ASSIGNMENT:

Create a table EMPLOYEE with following schema:


(Emp_no, E_name, E_address, E_ph_no, Dept_no, Dept_name,Job_id , Salary)

Write SQL queries for following question:


1. Insert aleast 5 rows in the table.
2. Display all the information of EMP table.
3. Display the record of each employee who works in department D10.
4. Update the city of Emp_no-12 with current city as Nagpur.
5. Display the details of Employee who works in department MECH.
6. Delete the email_id of employee James.
7. Display the complete record of employees working in SALES Department.

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

Experiment No: 6.3

Title: Implementation of different types of functions with suitable examples.


 Number Function
 Aggregate Function
 Character Function
 Conversion Function
 Date Function

Objective:
NUMBER FUNCTION:

Abs(n) :Select abs(-15) from dual;


Exp(n): Select exp(4) from dual;
Power(m,n): Select power(4,2) from dual;
Mod(m,n): Select mod(10,3) from dual;
Round(m,n): Select round(100.256,2) from dual;
Trunc(m,n): ;Select trunc(100.256,2) from dual;
Sqrt(m,n);Select sqrt(16) from dual;

Develop aggregate plan strategies to assist with summarization of several data entries.

Aggregative operators: In addition to simply retrieving data, we often want to perform some
computation or summarization. SQL allows the use of arithmetic expressions. We now
consider a powerful class of constructs for computing aggregate values such as MIN and
SUM.

1. Count: COUNT following by a column name returns the count of tuple in that column. If
DISTINCT keyword is used then it will return only the count of unique tuple in the column.
Otherwise, it will return count of all the tuples (including duplicates) count (*) indicates all
the tuples of the column.
Syntax: COUNT (Column name)
Example: SELECT COUNT (Sal) FROM emp;
COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

2. SUM: SUM followed by a column name returns the sum of all the values in that column.
Syntax: SUM (Column name)
Example: SELECT SUM (Sal) From emp;

3. AVG: AVG followed by a column name returns the average value of that column values.
Syntax: AVG (n1, n2...)
Example: Select AVG (10, 15, 30) FROM DUAL;

4. MAX: MAX followed by a column name returns the maximum value of that column.
Syntax: MAX (Column name)
Example: SELECT MAX (Sal) FROM emp;
SQL> select deptno, max(sal) from emp group by deptno;

DEPTNO MAX (SAL)

10 5000
20 3000
30 2850

SQL> select deptno, max (sal) from emp group by deptno having max(sal)<3000;

DEPTNO MAX(SAL)

30 2850

5. MIN: MIN followed by column name returns the minimum value of that column.
Syntax: MIN (Column name)
Example: SELECT MIN (Sal) FROM emp;

SQL>select deptno,min(sal) from emp group by deptno having min(sal)>1000;

DEPTNO MIN (SAL)

10 1300

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

CHARACTER FUNCTION:

initcap(char) : select initcap(“hello”) from dual;

lower (char): select lower („HELLO‟) from dual;

upper (char) :select upper („hello‟) from dual;

ltrim (char,[set]): select ltrim („cseit‟, „cse‟) from dual;

rtrim (char,[set]): select rtrim („cseit‟, „it‟) from dual;

replace (char,search ): select replace(„jack and jue‟,„j‟,„bl‟) from dual;

CONVERSION FUNCTIONS:
To_char: TO_CHAR (number) converts n to a value of VARCHAR2 data type, using the
optional number format fmt. The value n can be of type NUMBER, BINARY_FLOAT, or
BINARY_DOUBLE.

SQL>select to_char(65,'RN')from dual;

LXV

To_number : TO_NUMBER converts expr to a value of NUMBER data type.


SQL>Select to_number ('1234.64') from Dual;
1234.64

To_date:TO_DATE converts char of CHAR, VARCHAR2, NCHAR, or


NVARCHAR2 data type to a value of DATE data type.
SQL>SELECT TO_DATE('January 15, 1989, 11:00 A.M.')FROM DUAL;

TO_DATE

15-JAN-89

STRING FUNCTIONS:
Concat: CONCAT returns char1 concatenated with char2. Both char1 and char2 can be any
of the datatypes
COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

SQL>SELECT CONCAT(„ORACLE‟,‟CORPORATION‟)FROM DUAL;


ORACLECORPORATION

Lpad: LPAD returns expr1, left-padded to length n characters with the sequence of
characters in expr2.
SQL>SELECT LPAD(„ORACLE‟,15,‟*‟)FROM DUAL;
*********ORACLE
Rpad: RPAD returns expr1, right-padded to length n characters with expr2, replicated as
many times as necessary.
SQL>SELECT RPAD („ORACLE‟,15,‟*‟)FROM DUAL;
ORACLE*********

Ltrim: Returns a character expression after removing leading blanks.


SQL>SELECT LTRIM(„SSMITHSS‟,‟S‟)FROM DUAL;
MITHSS

Rtrim: Returns a character string after truncating all trailing blanks


SQL>SELECT RTRIM(„SSMITHSS‟,‟S‟)FROM DUAL;
SSMITH

Lower: Returns a character expression after converting uppercase character data to


lowercase.
SQL>SELECT LOWER(„DBMS‟)FROM DUAL;
dbms

Upper: Returns a character expression with lowercase character data converted to uppercase
SQL>SELECT UPPER(„dbms‟)FROM DUAL;
DBMS
Length: Returns the number of characters, rather than the number of bytes, of the given
string expression, excluding trailing blanks.
SQL>SELECT LENGTH(„DATABASE‟)FROM DUAL;
8
Substr: Returns part of a character, binary, text, or image expression.
SQL>SELECT SUBSTR(„ABCDEFGHIJ‟3,4)FROM DUAL;
CDEF
COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

Instr: The INSTR functions search string for substring. The function returns an integer
indicating the position of the character in string that is the first character of this occurrence.
SQL>SELECT INSTR('CORPORATE FLOOR','OR',3,2)FROM DUAL;
14
DATE FUNCTIONS:
Sysdate:
SQL>SELECT SYSDATE FROM DUAL;
29-DEC-08
next_day:
SQL>SELECT NEXT_DAY(SYSDATE,‟WED‟)FROM DUAL;
05-JAN-09
add_months:
SQL>SELECT ADD_MONTHS(SYSDATE,2)FROM DUAL;
28-FEB-09
last_day:
SQL>SELECT LAST_DAY(SYSDATE)FROM DUAL;
31-DEC-08
months_between:
SQL>SELECT MONTHS_BETWEEN(SYSDATE,HIREDATE)FROM EMP;
4
Least:
SQL>SELECT LEAST('10-JAN-07','12-OCT-07')FROM DUAL;
10-JAN-07
Greatest:
SQL>SELECT GREATEST('10-JAN-07','12-OCT-07')FROM DUAL;
10-JAN-07
Trunc:
SQL>SELECT TRUNC(SYSDATE,'DAY')FROM DUAL;
28-DEC-08

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

Round:
SQL>SELECT ROUND(SYSDATE,'DAY')FROM DUAL;
28-DEC-08
to_char:
SQL> select to_char(sysdate, "dd\mm\yy") from dual;
24-mar-05.
to_date:
SQL> select to date (sysdate, "dd\mm\yy") from dual;
24-mar-o5.

LAB PRACTICE ASSIGNMENT:

Create a table EMPLOYEE with following schema:

(Emp_no, E_name, E_address, E_ph_no, Dept_no, Dept_name,Job_id, Designation , Salary)

Write SQL statements for the following query.

1. List the E_no, E_name, Salary of all employees working for MANAGER.

2. Display all the details of the employee whose salary is more than the Sal of any IT PROFF..

3. List the employees in the ascending order of Designations of those joined after 1981.

4. List the employees along with their Experience and Daily Salary.

5. List the employees who are either „CLERK‟ or „ANALYST‟ .

6. List the employees who joined on 1-MAY-81, 3-DEC-81, 17-DEC-81,19-JAN-80 .

7. List the employees who are working for the Deptno 10 or20.

8. List the Enames those are starting with „S‟ .

9. Dislay the name as well as the first five characters of name(s) starting with „H‟

10. List all the emps except „PRESIDENT‟ & „MGR” in asc order of Salaries.

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

Experiment No: 6.4

Title : Implementation of different types of operators in SQL.


 Arithmetic Operator
 Logical Operator
 Comparision Operator
 Special Operator
 Set Operator

Objective:
To learn different types of operator.

Theory:

ARIHMETIC OPERATORS:

(+) : Addition - Adds values on either side of the operator .

(-):Subtraction - Subtracts right hand operand from left hand operand .

(*):Multiplication - Multiplies values on either side of the operator .

(/):Division - Divides left hand operand by right hand operand .

(^):Power- raise to power of .

(%):Modulus - Divides left hand operand by right hand operand and returns remainder.

LOGICAL OPERATORS:

AND : The AND operator allows the existence of multiple conditions in an SQL statement's
WHERE clause.

OR: The OR operator is used to combine multiple conditions in an SQL statement's WHERE
clause.

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

NOT: The NOT operator reverses the meaning of the logical operator with which it is used.
Eg: NOT EXISTS, NOT BETWEEN, NOT IN, etc. This is a negate operator.

COMPARISION OPERATORS:

(=):Checks if the values of two operands are equal or not, if yes then condition becomes true.

(!=):Checks if the values of two operands are equal or not, if values are not equal then
condition becomes true.

(< >):Checks if the values of two operands are equal or not, if values are not equal then
condition becomes true.

(>):Checks if the value of left operand is greater than the value of right operand, if yes then
condition becomes true

(<):Checks if the value of left operand is less than the value of right operand, if yes then
condition becomes true.

(>=):Checks if the value of left operand is greater than or equal to the value of right operand,
if yes then condition becomes true.

(<=):Checks if the value of left operand is less than or equal to the value of right operand, if
yes then condition becomes true.

SPECIAL OPERATOR:

BETWEEN: The BETWEEN operator is used to search for values that are within a set of
values, given the minimum value and the maximum value.

IS NULL: The NULL operator is used to compare a value with a NULL attribute value.

ALL: The ALL operator is used to compare a value to all values in another value set

ANY: The ANY operator is used to compare a value to any applicable value in the list
according to the condition.

LIKE: The LIKE operator is used to compare a value to similar values using wildcard
operators.It allows to use percent sign(%) and underscore ( _ ) to match a given string pattern.
COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

IN: The IN operator is used to compare a value to a list of literal values that have been
specified.

EXIST: The EXISTS operator is used to search for the presence of a row in a specified table
that meets certain criteria.

SET OPERATORS:

The Set operator combines the result of 2 queries into a single result. The following
are the operators:
 Union
 Union all
 Intersect
 Minus

Union: Returns all distinct rows selected by both the queries


Union all: Returns all rows selected by either query including the duplicates.
Intersect: Returns rows selected that are common to both queries.
Minus: Returns all distinct rows selected by the first query and are not by the second

LAB PRACTICE ASSIGNMENT:

1. Display all the dept numbers available with the dept and emp tables avoiding duplicates.
2. Display all the dept numbers available with the dept and emp tables.
3. Display all the dept numbers available in emp and not in dept tables and vice versa.

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

Experiment No: 6.5

Title : Implementation of different types of Joins


 Inner Join
 Outer Join
 Natural Join..etc

Objective :
To implement different types of joins

Theory :
The SQL Joins clause is used to combine records from two or more tables in a
database. A JOIN is a means for combining fields from two tables by using values common
to each.The join is actually performed by the „where‟ clause which combines specified rows
of tables.
Syntax:
SELECT column 1, column 2, column 3...
FROM table_name1, table_name2
WHERE table_name1.column name = table_name2.columnname;

Types of Joins:
1. Simple Join
2. Self Join
3. Outer Join

Simple Join:
It is the most common type of join. It retrieves the rows from 2 tables having a
common column and is further classified into
Equi-join :
A join, which is based on equalities, is called equi-join.
Example:
Select * from item, cust where item.id=cust.id;

In the above statement, item-id = cust-id performs the join statement. It retrieves rows
from both the tables provided they both have the same id as specified by the where clause.
Since the where clause uses the comparison operator (=) to perform a join, it is said to be
COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

equijoin. It combines the matched rows of tables. It can be used as follows:

 To insert records in the target table.


 To create tables and insert records in this table.
 To update records in the target table.
 To create views.

Non Equi-join:
It specifies the relationship between columns belonging to different tables by
making use of relational operators other than‟=‟.

Example:
Select * from item, cust where item.id<cust.id;
Table Aliases
Table aliases are used to make multiple table queries shorted and more readable. We give
an alias name to the table in the „from‟ clause and use it instead of the name throughout
the query.

Self join:
Joining of a table to itself is known as self-join. It joins one row in a table to another.
It can compare each row of the table to itself and also with other rows of the same table.

Example:
select * from emp x ,emp y where x.salary >= (select avg(salary) from x.emp
where x. deptno =y.deptno);

Outer Join:

It extends the result of a simple join. An outer join returns all the rows returned by simple
join as well as those rows from one table that do not match any row from the table. The
symbol(+) represents outer join.

– Left outer join

– Right outer join

– Full outer join

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

LAB PRACTICE ASSIGNMENT:


Consider the following schema:
Sailors (sid, sname, rating, age)
Boats (bid, bname, color)
Reserves (sid, bid, day(date))

1. Find all information of sailors who have reserved boat number 101.
2. Find the name of boat reserved by Bob.
3. Find the names of sailors who have reserved a red boat, and list in the order of age.
4. Find the names of sailors who have reserved at least one boat.
5. Find the ids and names of sailors who have reserved two different boats on the same
day.
6. Find the ids of sailors who have reserved a red boat or a green boat.
7. Find the name and the age of the youngest sailor.
8. Count the number of different sailor names.
9. Find the average age of sailors for each rating level.
10. Find the average age of sailors for each rating level that has at least two sailors.

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

Experiment No: 6.6

Title : Study & Implementation of


 Group by & Having Clause
 Order by Clause
 Indexing

Objective:
To learn the concept of group functions

Theory:

 GROUP BY: This query is used to group to all the records in a relation together for each
and every value of a specific key(s) and then display them for a selected set of fields the
relation.

Syntax: SELECT <set of fields> FROM <relation_name>


GROUP BY <field_name>;

Example: SQL> SELECT EMPNO, SUM (SALARY) FROM EMP GROUP BY


EMPNO;

GROUP BY-HAVING : The HAVING clause was added to SQL because the WHERE
keyword could not be used with aggregate functions. The HAVING clause must follow the
GROUP BY clause in a query and must also precede the ORDER BY clause if used.

Syntax: SELECT column_name, aggregate_function(column_name) FROM table_name


WHERE column_name operator value
GROUP BY column_name
HAVING aggregate_function(column_name) operator value;

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

Example : SELECT Employees.LastName, COUNT(Orders.OrderID) AS NumberOfOrders


FROM (Orders
INNER JOIN Employees
ON Orders.EmployeeID=Employees.EmployeeID) GROUP BY LastName
HAVING COUNT (Orders.OrderID) > 10;

JOIN using GROUP BY: This query is used to display a set of fields from two relations by
matching a common field in them and also group the corresponding records for each and
every value of a specified key(s) while displaying.

Syntax: SELECT <set of fields (from both relations)> FROM relation_1,relation_2


WHERE relation_1.field_x=relation_2.field_y GROUP BY field_z;
Example:
SQL> SELECT empno,SUM(SALARY) FROM emp,dept
WHERE emp.deptno =20 GROUP BY empno;

 ORDER BY: This query is used to display a selected set of fields from a relation in an
ordered manner base on some field.

Syntax: SELECT <set of fields> FROM <relation_name>


ORDER BY <field_name>;

Example: SQL> SELECT empno, ename, job FROM emp ORDER BY job;

JOIN using ORDER BY: This query is used to display a set of fields from two relations by
matching a common field in them in an ordered manner based on some fields.
Syntax: SELECT <set of fields (from both relations)> FROM relation_1, relation_2
WHERE relation_1.field_x = relation_2.field_y ORDER BY field_z;
Example: SQL> SELECT empno,ename,job,dname FROM emp,dept
WHERE emp.deptno = 20 ORDER BY job;

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

 INDEXING: An index is an ordered set of pointers to the data in a table. It is based on


the data values in one or more columns of the table. SQL Base stores indexes separately
from tables.
An index provides two benefits:
 It improves performance because it makes data access faster.
 It ensures uniqueness. A table with a unique index cannot have two rows with
the same values in the column or columns that form the index key.

Syntax:
CREATE INDEX <index_name> on <table_name> (attrib1,attrib 2….attrib n);

Example:
CREATE INDEX id1 on emp(empno,dept_no);

LAB PRACTICE ASSIGNMENT:

Create a relation and implement the following queries.

1. Display total salary spent for each job category.


2. Display lowest paid employee details under each manager.
3. Display number of employees working in each department and their department name.
4. Display the details of employees sorting the salary in increasing order.
5. Show the record of employee earning salary greater than 16000 in each department.
6. Write queries to implement and practice the above clause.

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

Experiment No: 6.7

Title : • Study & Implementation of different types of constraints

Objective:
To practice and implement constraints

Theory:
CONSTRAINTS:
Constraints are used to specify rules for the data in a table. If there is any violation between
the constraint and the data action, the action is aborted by the constraint. It can be specified
when the table is created (using CREATE TABLE statement) or after the table is created
(using ALTER TABLE statement).

1. NOT NULL: When a column is defined as NOTNULL, then that column becomes a
mandatory column. It implies that a value must be entered into the column if the record is to
be accepted for storage in the table.

Syntax:
CREATE TABLE Table_Name (column_name data_type (size) NOT NULL, );
Example:
CREATE TABLE student (sno NUMBER(3)NOT NULL, name CHAR(10));

2. UNIQUE: The purpose of a unique key is to ensure that information in the column(s) is
unique i.e. a value entered in column(s) defined in the unique constraint must not be repeated
across the column(s). A table may have many unique keys.
Syntax:
CREATE TABLE Table_Name(column_name data_type(size) UNIQUE, ….);
Example:
CREATE TABLE student (sno NUMBER(3) UNIQUE, name CHAR(10));

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

3. CHECK: Specifies a condition that each row in the table must satisfy. To satisfy the
constraint, each row in the table must make the condition either TRUE or unknown (due to a
null).
Syntax:
CREATE TABLE Table_Name(column_name data_type(size) CHECK(logical
expression), ….);
Example:
CREATE TABLE student (sno NUMBER (3), name CHAR(10),class
CHAR(5),CHECK(class IN(„CSE‟,‟CAD‟,‟VLSI‟));

4. PRIMARY KEY: A field which is used to identify a record uniquely. A column or


combination of columns can be created as primary key, which can be used as a reference
from other tables. A table contains primary key is known as Master Table.
 It must uniquely identify each record in a table.
 It must contain unique values.
 It cannot be a null field.
 It cannot be multi port field.
 It should contain a minimum no. of fields necessary to be called unique.
Syntax:
CREATE TABLE Table_Name(column_name data_type(size) PRIMARY KEY,
….);
Example:
CREATE TABLE faculty (fcode NUMBER(3) PRIMARY KEY, fname
CHAR(10));

5. FOREIGN KEY: It is a table level constraint. We cannot add this at column level. To
reference any primary key column from other table this constraint can be used. The table in
which the foreign key is defined is called a detail table. The table that defines the primary
key and is referenced by the foreign key is called the master table.
Syntax: CREATE TABLE Table_Name(column_name data_type(size)
FOREIGN KEY(column_name) REFERENCES table_name);
COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

Example:
CREATE TABLE subject (scode NUMBER (3) PRIMARY KEY, subname
CHAR(10),fcode NUMBER(3), FOREIGN KEY(fcode) REFERENCE faculty );

Defining integrity constraints in the alter table command:

Syntax: ALTER TABLE Table_Name ADD PRIMARY KEY (column_name);


Example: ALTER TABLE student ADD PRIMARY KEY (sno);
(Or)

Syntax: ALTER TABLE table_name ADD CONSTRAINT constraint_name


PRIMARY KEY(colname)
Example: ALTER TABLE student ADD CONSTRAINT SN PRIMARY KEY(SNO)

Dropping integrity constraints in the alter table command:


Syntax: ALTER TABLE Table_Name DROP constraint_name;
Example: ALTER TABLE student DROP PRIMARY KEY;

(or)

Syntax: ALTER TABLE student DROP CONSTRAINT constraint_name;


Example: ALTER TABLE student DROP CONSTRAINT SN;

6. DEFAULT : The DEFAULT constraint is used to insert a default value into a column. The
default value will be added to all new records, if no other value is specified.
Syntax:
CREATE TABLE Table_Name(col_name1,col_name2,col_name3
DEFAULT „<value>‟);
Example:
CREATE TABLE student (sno NUMBER(3) UNIQUE, name CHAR(10),address
VARCHAR(20) DEFAULT „Aurangabad‟);

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

LAB PRACTICE ASSIGNMENT:

1. Create a table called EMP with the following structure.

Name Type

EMPNO NUMBER (6)


ENAME VARCHAR2 (20)
JOB VARCHAR2 (10)
DEPTNO NUMBER (3)
SAL NUMBER (7,2)
Allow NULL for all columns except ename and job.
2. Add constraints to check, while entering the empno value (i.e) empno > 100.
3. Define the field DEPTNO as unique.
4. Create a primary key constraint for the table(EMPNO).
5. Write queries to implement and practice constraints.

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

Experiment No: 6.8

Title :
 Study and Implementation of Database Backup & Recovery Commands.
 Study and Implementation of Rollback, Commit, Save point.

Objective:
To understand the concept of administrative commands

Theory:
A transaction is a logical unit of work. All changes made to the database can be
referred to as a transaction. Transaction changes can be made permanent to the database only
if they are committed a transaction begins with an executable SQL statement & ends
explicitly with either rollback or commit statement.

1. COMMIT: This command is used to end a transaction only with the help of the commit
command transaction changes can be made permanent to the database.

Syntax: SQL> COMMIT;

Example: SQL> COMMIT;

2. SAVE POINT: Save points are like marks to divide a very lengthy transaction to smaller
once. They are used to identify a point in a transaction to which we can latter role back. Thus,
save point is used in conjunction with role back.

Syntax: SQL> SAVE POINT ID;

Example: SQL> SAVE POINT xyz;

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

3. ROLLBACK: A role back command is used to undo the current transactions. We can role
back the entire transaction so that all changes made by SQL statements are undo (or) role

back a transaction to a save point so that the SQL statements after the save point are role
back.

Syntax: ROLLBACK (current transaction can be role back)

ROLLBACK to save point ID;

Example: SQL> ROLLBACK;

SQL> ROLLBACK TO SAVE POINT xyz;

LAB PRACTICE ASSIGNMENT:

1. Write a query to implement the save point.


2. Write a query to implement the rollback.
3. Write a query to implement the commit.

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
Govt. Industrial Training Instt., Lower Parel,Mumbai-11

VIVA-VOCE

1. Define DCL?

The DCL language is used for controlling the access to the table and hence securing
the database. DCL is used to provide certain privileges to a particular user. Privileges are
rights to be allocated.
2. List the DCL commands used in data bases
The privilege commands are namely, Grant and Revoke
3. Write the syntax for grant command
Grant < database_priv [database_priv…..] > to <user_name> identified by <password>
[,<pass word…..];
Grant <object_priv> | All on <object> to <user | public> [ With Grant Option ];
4. What are TCL commands?

*Commit *Rollback *save point


5. What are single row functions?
A single row function or scalar function returns only one value for every row
queries in table. Single row function can appear in a select command and can also be
included in a where clause. The single row function can be broadly classified as,
* Date Function * Conversion Function
* Numeric Function * Miscellaneous Function
*Character Function
6. List some character functions

initcap(char);
lower (char);
upper (char);
ltrim (char,[set]); rtrim (char,[set]);
7. What is a view?

A view is a logical table based on a table or another view. A view contains no data of
its own but is like a window through which data from tables can be viewed or changed.
8. List any two advantages of view?

1. Hides data complexity.


2. Simplifies the usage by combining multiple tables into a single table
9. List the set operations of SQL?
1) Union 2) Intersect operation 3) The except operation (minus)

10. What is the use of sub Queries?

A sub Queries is a select-from-where expression that is nested with in another


Queries. A common use of sub Queries is to perform tests for set membership, make set
comparisons and determine set cardinality

COPA Create and Manage Database using MySQL Instructor: Mrs. S.Y. Deshmukh
IT & ITES Exercise 1.10.68
COPA - Configuring and Using Network

Installing NIC card and sharing a printer with network


Objectives : At the end of this exercise you shall be able to
• install network interface card
• share the printer, folder and drives with the network
• change sharing option for different network profiles
• set sharing option and permissions specific files or folders in local network

Requirements

Tools/Equipments/Instruments
• A working PC - 1 No./batch.

PROCEDURE

TASK 1 : Install network interface card


6 Locate the expansion slots in the motherboard.
1 Shut down the system if it is on.
2 Remove all cables connecting to the computer. Note : Expansion slots are either long black
strips or short white strips. ISA slots are black.
3 Locate the screws holding the case cover in place on PCI slots are white. Open slots are those that
the frame. do not have other boards inserted in them.
4 Remove the screws attaching the cover to the frame.
7 Determine which interface (ISA or PCI) your card uses.
Note : Many new systems have tight cases and/
or special cases. Removing the casing might Note : ISA is long and the gold contacts are
require some prying. Use a flat-head large. PCI is much shorter and smaller.
screwdriver to push the case open against the
front panel. Seek assistance if you cannot 8 Check to see if the expansion slot opening next to
open the case alone. If the case seems really the slot is covered. If it is, remove the cover by un-
peculiar, check your computer's user manual screwing it from the frame or popping it out.
first to see if they instruct you on how to open 9 Insert your card into the expansion slot on the
your computer. motherboard as shown in Fig 2. Press firmly so the
5 Place the open computer frame on its side with the entire part of the card that has the gold contacts goes
motherboard facing up as shown in Fig 1. completely into the expansion slot on the motherboard
and will go no further
Fig 1
Note : Make sure the side of the card
resembling the expansion slot cover you just
removed is covering most of the open slot.

10 Screw the card into place with the screw you removed
from the expansion slot cover or a new screw.

Fig 2

Note : This means you can see the


motherboard from a bird's eye view. The
motherboard is the biggest board you can see
within the frame. It usually covers an entire
side and has other smaller boards sticking up
from it. 313
11 Replace the case and screw it back in place after con- 13 Turn on the power.
firming the proper placement of the card.
14 Refer to your user's manual to install the proper drivers
from the disk(s) that came with the card.
Note : Make sure you did not leave any tools
or screws within the computer. 15 Check the status of installed card (NIC) in device
manager
12 Reconnect all the cables to their proper places.
16 Get it checked with the instructor

TASK 2 : Share the printer, folders, and drives with the network

1 Share the printer panel as follows : Note : There you will see a list with all exter-
Start Control panel Hardware and Sound nal devices installed on your PC as in Fig 3.
Devices and Printers
Fig 3

2 Select the printer you want to share, right click on it 3 Click on the Sharing tab.
and select Printer properties.
Note : There, you will have some options
Note : Now you will see a window with all the similar to the Fig 4.
printer properties. Depending on the model
of your printer, and its drivers, you can see
different sets of options.

314 IT & ITES : COPA (NSQF Level - 4) - Exercise 1.10.68


Fig 4

4 Select any check box that says 'Share this printer'. 5 Click on OK.

Note : Then, you can edit the printer share Note : Now the printer will be shared with the
name which, in most cases, is by default computers on your network.
completed by Windows with the name of your
printer model. If you want to change it, type Share the folder or drives
the name you want to use.
1 Open 'File Explorer".

Note : "Render all print jobs on the client 2 Select the folder or drive you want to share the net-
computers" can help keep performance levels work.
up on the computer where the printer is 3 Right click the mouse button and select properties .
plugged in, especially when big printing jobs
4 Select sharing tap and click advance sharing button.
are ordered. When this option is checked, all
the print jobs are rendered on the computers 5 Choose share this folder and click "OK" button.
which order the print job, not on the computer
on which the printer is plugged.

TASK 3 : Change sharing option for different network profiles

1 In Windows, right click the Network connection icon Fig 5


in the system tray as shown in Fig 5.

IT & ITES : COPA (NSQF Level - 4) - Exercise 1.10.68 315


2 Click open Network and internet setting as on Fig 6. Fig 8
Fig 6

3 On the network status page, scroll down and click


Network and sharing center as on Fig 7.
Fig 7
Fig 9

4 In the left pane, click change advanced sharing


settings as on Fig 8. Note: There are sharing settings for your
5 Select both turn on network discovery and turn on file private profile, guest or public profile and all
and printer sharing in the sharing profile need to change networks.
as on Fig 9.

TASK 4 : Set sharing option and permissions specific files or folders in local network
1 In windows, search for and open File Explore. 5 Click the down arrow and select the user you want the
share with, if the user is not listed, type the user name
2 Browse to the folder you want to share.
and then click add.
3 Right - click the folder, select share with and the click
6 Clica an arrow under permission level to set the
Home Group (view), homegroup (view and edit) or
permission level for each user or group as on Fig 11.
specific people as on Fig 10.
Fig 10 Fig 11

4 If you choose specific people, the file sharing window


is displayed.

316 IT & ITES : COPA (NSQF Level - 4) - Exercise 1.10.68


IT & ITES Exercise 1.10.69
COPA - Configuring and Using Network

Identification of different cables and connectors used in networking


Objectives : At the end of this exercise you shall be able to
• identify various network devices, cables and connectors used in networking
• create straight and cross cable and punch a UTP cable in the patch socket
• testing the cable connectivity with the LAN tester
• create workgroup and check the network connections
• create a home group on a local network.

Requirements

Materials/components • Thin coaxial cable RG48 -5m.


• BNC connector -1No.
• UTP cable (CAT 5) -5m.
• T connector -1No.
• RS232 communication cable -10 core cable • Terminator -1No.
(5 metres).
• RS232 9 pin female & 25 pin -1 No.each. Tools/Equipments/Instruments
male connectors
• RJ45 jack -1 No.
• DMM -1No.

PROCEDURE

TASK1: Identify cables and connectors

1 Identify a labelled component referring to Table 1 and 3 Get the work checked by your instructor.
record the details in the Record sheet.
2 Repeat step 1 and record the details in the Record
Sheet.

Record sheet
Table 1

Cable/ connector Label Brief application

UTP cable No.of pins colour code Printedmark

Coaxial cable

RJ 45 connector No.of pins

T connector

Terminator Resistance between inner and outercore

RS232 cable Thinkness No.of cores

RS232 connector 9 pin type female 25 pin D-type male

317
TASK 2 : Create straight and cross cable and punch a UTP cable in the patch socket
Note to instructor : Instructor must arrange the required Fig 3a
length of cross cable, the tool for crimping and two
computer for making connection as shown in Fig 1.

Fig 1

Fig 4

1 Use crimping tool (as shown in Fig 2) to cut through a


cable and strip the cable jacket/insulation using cable
stripper/ crimping.
Fig 2

Fig 4a

Note : Crimp tools have two blades. One


designed to cut the cable and other to strip
the jacket. While stripping the cable care
should be taken not to cut the internal wires.
Remove the jacket insulation about an inch.
When the jacket insulation removed you will Note : The color code wiring order is different
find eight wires twisted in to four pair (for CAT for both ends in cross cable
5 cable as in Fig 3) and a separator inside the
• Cross over cable
CAT 6 cable as shown in Fig 3a
• One end (Fig 4)
Fig 3
• Other end (Fig 4a)
4 Grasp the wires firmly between your fingers and flat-
ten them to remove the curliness
Note : The wires must lay flat and together
aligned as closely as possible in order. When
finished the cable should look like as shown
in Fig 5
5 Cut a few mm while holding them firmly, so they are
2 Cut the separator off and untwist the wires back to all of the same length as shown in Fig 6.
within one-eighth inch of the jacket
6 Slide the RJ45 connector on to the wires making sure
3 Arrange the wires from left to right in the order they the wires stay lined up
are to be crimped. The normal crimping order for cross
cable is shown in Fig 4 & Fig 4a

318 IT & ITES : COPA (NSQF Level - 4) - Exercise 1.10.69


Fig 5 Fig 8

Fig 9
Fig 6

Note : Try to make each wire fits in the slot of Fig 10


the connector and make each wire reach the
end of its slot. The cable jacket/insulation
should reach just beyond the end of the crimp
point as shown in Fig 7.

Fig 7

Note : Similarly straight through cable and roll


over cable can be prepared with the help of
7 Verify all the wires are in the correct order, and insert the instructor. The color code wiring order is
the connector in to the crimping tool and press to crimp shown in Fig 11.
as shown in Fig 8.
1 Green White
Note : Now half of the work done. The cable 2 Green
should look like as shown in the Fig 9 .The
process must be repeated for the other end of 3 Orange White
the cable. However the color code wiring order 4 Blue
changes for cross cable as shown in Fig 10.
5 Blue White

IT & ITES : COPA (NSQF Level - 4) - Exercise 1.10.69 319


Fig 11

6 Orange Note : Cross over cable is used to connect be-


tween two hosts(PC's). Straight-through cable
7 Brown White
is used in a network when connecting a host
8 Brown to a switch. A rollover cable is used in a net-
working environment where a outer/switch is
to be configured from a computer. One end is
wired one way but on the other it is reversed.
You would typically use one end into a serial
port on a PC and the other into the console
port of the switch/router.

TASK 3 : Testing the cable with the LAN tester


1 Insert one end of the cross cable (prepared in Task 1) 3 Note the order in which LED's glowing in both the panel
in to one socket and other end in another plugged in of the LAN tester should correspond to the order shown
socket of the LAN tester as shown in Fig 12. in Fig 13.
Fig 12 Fig 13
One side other side

Note : Check for the batteries loaded in cable


tester
If the LED's doesn't glow , then there is a break in the
2 Switch ‘ON’ the LAN tester. cable.

TASK 4: Create workgroup and check the network connection

1 Open Control Panel from start menu. (Fig 14) 4 Select advance system setting.
2 Now select System & Security option. (Fig 15) 5 Select computer name.
3 Select System. 6 Click change. (See Fig 16)

320 IT & ITES : COPA (NSQF Level - 4) - Exercise 1.10.69


Fig 14 Fig 16

Fig 7 Enter Computer Name (refer Fig 4)


15
8 Click OK

Fig 17

TASK 5 : Creating a Home Group on a local network

Create a Home Group to share libraries and Fig 18


devices with other computers on the network.
You can also stream media between devices.

1 In Windows, search for and open Home Group.


2 If a Home Group has been created already, enter the
password for it, and then click join.

User can find the password for the Home Group


on the computer that created it.

3 If a Home Group has not been created, click Create a


Home Group in Fig 18.
4 In he Create a Home Group window, click Next as
shown in Fig 19.

IT & ITES : COPA (NSQF Level - 4) - Exercise 1.10.69 321


Govt. ITI Lower Parel, Mumbai-11

Practical Skills :
a. Use block level formatting tags to present content on web page.
b. Use text level formatting tags to present content on web page.
c. Apply hyper linking on web page.
d. Organize the content using table and frames.
e. Apply presentation schemes on content using CSS.
f. Publish websites on Internet or Intranet.
Sr. a. b. c. d. e. f.
Title of the Practical
No.
Create web page using structure tags to
1.
display sample message. √ - - - - -
Create a web page for displaying a paragraph
2.
using block level tags, HR tags (Part-I) √ - - - - -
Create a Web Page using Text level tags and
3.
Special Characters - √ - - - -
Create a web page for implementing different
4.
types of Lists. - √ - - - -
Create a web page to link-
a. A different web page of same site.
b. A different location on the same web
5.
page
- - √ - - -
c. A specific location on different web
page of same site.
i) Create a web page to link-
a. An external page of different web site
6.
b. To an email ID
- - √ - - -
ii) Write tags to change colors of links
Insert images on web page using various
7.
attributes - - √ - - -
Implement image as a button and set image as
8.
background.
- - √ - - -
9. Create a web page to implement Frame tags. - - - √ - -
10. Create a web page to implement Table tags. - - - √ - -
Create a web page for demonstration of CSS
11. - - - - √ -
by applying Internal/External/ Inline style

i
COPA
Industrial Training Institute, Lower Parel, Mumbai-11.
Practical No. 7.1 Date

Name of Practical: Create Sample Web Page

Instructor Name Duration Trade C.O.P.A

Objective: At the end of this exercise you shall be able to

1. Create Web page by using HTML tags.


2. Save HTML document with proper extension on specified location.
3. Display HTML document on web browser.

I Practical Outcome
Create a Web Page using structured tags.

II Minimum Theoretical Background

Practical Significance
A web page is a HTML document accessible on the World Wide Web
(WWW).HyperText Markup Language (HTML) is the most commonly used markup
language for creating web pages. This practical is useful for creating web page using
HTML which display a sample message.
All HTML documents must start with a document type
declaration: <!DOCTYPE html>.The HTML document itself begins
with <html> and ends with </html>.
HTML document is divided into two parts: The head and the body. The <head>
element is used to specify information about the HTML Web Page as title of the Web
Page. Actual content of the Web Page are specified inside the <body> element.

Web page structure:


<!DOCTYPE html>
<html>
<head>
<title>PageTitle</title>
</head>
<body>
</body>
</html>

2
COPA Web Page Designing with HTML
Example of Web page structure:
Create a Web page to display sample message “Web Page Designing using
HTML”
Steps:
1. Open Text Editor.
2. Write following HTML codes to display sample message.

3. Save above program with file name “first.html” under a folder name “HTML”
in “D” drive.
4. Run this program using web browser with the path specified as follows:
D:/HTML/first.html.
Output:

Exercise
1. Create a web page to display name of your college and save the page with
yourname.
2. Create a web page to display name of any IT company you know and save the
page with your Rollno.

3
COPA Web Page Designing with HTML
HTML‟ Code
Write HTML code for above exercise on the blank pages attached at the end of
practical.
Output (Take screen shot of the webpage created as output and attach it here)
…………………………………………………………………………………………
…………………………………………………………………………………………

Conclusion
…………………………………………………………………………………………
…………………………………………………………………………………………

Assignment:
1. State the role of browser and List names of various browsers.
2. Differentiate between static and dynamic websites.
3. Write steps to save created HTML code.

4
COPA Web Page Designing with HTML
Industrial Training Institute, Lower Parel, Mumbai-11.
Practical No. 7.2 Date

Name of Practical: Create web page using Block Level tags


P
r
Instructor Name Duration Trade C.O.P.A
a
Objective: At the end of this exercise you shall be able to

1. Prepare Web page using different Block level tags like paragraph tag, Heading tag
and break tag.
2. Formatting HTML document using Block level tags as per the requirement.
3. Use block level formatting tags to present content on web page.

I Minimum Theoretical Background


Block Level Tags:
HTML (Hyper Text Markup Language) uses "block-level" elements tags.
Paragraph tag, Heading tag, break tag are different Block level tags. This practical is
useful for displaying content in blocks.
HTML uses "block-level" element tags. Paragraph tag <p> defines paragraph.
HTML defines six levels of headings. The heading elements are H1, H2, H3, H4, H5,
and H6 with H1 being the highest level and H6 the least level. The <br> tag inserts for
a single line break.
Following are different Block Level tags:

Tags Description Example


<p> Defines a paragraph <p> This is my First paragraph
</p>
<h1>to <h6> Defines Html headings <h1> This is my First Heading
</h1>
Inserts a single linebreak
<br> To break lines<br>in a text

<blockquote> The <blockquote> tag <blockquote>


specifies a section that is <p>Here is a long quotation
quoted from another source. here is a long quotation.
Browsers usually indent </p>
<blockquote> elements. </blockquote>

<pre > The <pre> tag used for <pre>


indicating preformatted text. The pre formatting tag
usedforindicating preformatted
text.
</pre>

5
COPA Web Page Designing with HTML
<address> The <address> tag provides <address>
contact information for a <ahref="mailto:[email protected]
document. The text in the om">[email protected]
<address> element usually </a>
renders in italic.This <br>John babbage
information includes name, <br>Box 212,Disneyland
email address, postal address, <br>USA
and phone number and so on. <br>
</address>
<hr> The <hr> tag represents a <body>
horizontal rule. The <hr> tag is <h1>HR tag</h1>
used to separate content in an The horizontal rule tag
HTML page. It has align, no represents a horizontal rule.
shade, size, width and color <hr>
attributes. </body>

II Exercise

1. Write HTML Code to show following output using block level tags.

2. Design a Web Page of your Department by using blockquote tag, preformatted


tag,address tag and applying attributes of HR tags.

6
COPA Web Page Designing with HTML
III „HTML‟ Code
1. Write HTML code for above exercise on the blank pages attached at the end
of practical.
2. Write HTML code to design a page using all above block level tags.

IV Output (Take screen shot of the webpage created as output and attach it here)
…………………………………………………………………………………………
…………………………………………………………………………………………

V Conclusion
…………………………………………………………………………………………
…………………………………………………………………………………………

VI Assignment:

1. List different block level tags


2. Write attributes of <P> tags.
3. Identify the correct HTML tag for inserting a line break?
a. <br>
b. <lb>
c. <bk>
d. <newline>
4. Enlist different attributes of <hr> tag.
5. Name the tag used to display preformatted output on a web page.
6. Differentiate between block quote and address tag.
7. Explain the use of address tag.

7
COPA Web Page Designing with HTML
Industrial Training Institute, Lower Parel, Mumbai-11.
Practical No. 7.3 Date

Name of Practical: Create a Web Page using Text level tags and Special
Characters in HTML
Instructor Name Duration Trade C.O.P.A

Objective: At the end of this exercise you shall be able to


1. Format web pages using Text level tags.
2. Display Special Characters using HTML entity name or the HTML entity number.
3. Use Text level formatting tags to present content on web page.

I Minimum Theoretical Background


HTML Text level tags are used to format the appearance of the text on web
page. The basic idea behind text formatting is to make a web page more attractive by
using tags like bold, italic or underline. This practical is useful for formatting a text
ofa web page using text level tags and inserting the special characters by using
HTML entity name or the HTML entity number.Knowledge of HTML, HTML tags
and Attributes, Concepts of Text level tags such as Bold, Italic, Teletype, Underline,
Strikethrough, Superscript, Subscript, DIV tag.

Text Level Tags:

Tag Description
<b>…</b> Text that appears within <b>...</b> element, is displayed in bold.
<i> …</i> Text that appears within <i>...</i> element is displayed in italic.
<u>…</u> Text appears within <u>...</u> element is displayed with
underline.
<tt>...</tt> The content of a <tt>...</tt> element is written in monospaced
font.
<strike>...</strike> Text that appears within <strike>...</strike> element is displayed
with strikethrough.
<sup>...</sup> The content of a <sup>...</sup> element is written in superscript.
<sub>...</sub> The content of a <sub>...</sub> element is written in subscript.
<div>…</div> The <div> elements allow to group together several elements to
create sections or subsections of a page.

HTML Special Characters:

Character Entity Number Entity Name Description


" &#34; &quot; quotation mark
' &#39; &apos; apostrophe
& &#38; &amp; ampersand
< &#60; &lt; less-than
> &#62; &gt; greater-than
© &#169; &copy; copyright
® &#174; &reg; registered trademark
8
COPA Web Page Designing with HTML
II Exercise

Write HTML code for following output using text level tags and special symbols.

III HTML Code


1. Write HTML code for above exercise on the blank pages attached at the end of
practical showing use of all above mentioned tags.
2. Write HTML code to design a page using all text level tags.

IV Output (Take screen shot of the webpage created as output and attach it here)
…………………………………………………………………………………………
…………………………………………………………………………………………

V Conclusion
…………………………………………………………………………………………
…………………………………………………………………………………………

VI Assignment:

1. Name the HTML tag used to bold text.


2. Explain the meaning of the following code.
<div id="menu" align="middle" >
3. Write procedure to insert a copyright symbol on a browser page?
4. State the difference between block level and text level tags.

9
COPA Web Page Designing with HTML
Industrial Training Institute, Lower Parel, Mumbai-11.
Practical No. 7.4 Date

Name of Practical: Create a web page using Different types of Lists in HTML

Instructor Name Duration Trade C.O.P.A

Objective: At the end of this exercise you shall be able to:


1.Implement different types of list in web pages.
2.Able to combine different types of list together for grouping the information.
3.Use Lists tags to present content on web page.

I Minimum Theoretical Background


Lists are used to create a well-structured and easy-to-maintain document. It is
group of related pieces of information and clearly associated with each other which are
more accessible. This practical is useful for organizing contents of the page by
implementing different types of Lists.Knowledge of HTML language tags and
attributes, Concept of Ordered Lists, Unordered Lists, Definition Lists and Nested
Lists.

Different Lists types:


Tag Description

<ul>…</ul> An unordered list. This will list items using plain bullets.
<ol>…</ol> An ordered list. This will use different schemes of numbers to
list your items.
<dl>…</dl> A definition list. This arranges your items in the same way as
they are arranged in a dictionary.
II Exercise

Write HTML code for following output using different types of lists.

10
COPA Web Page Designing with HTML
III HTML Code
Write HTML code for above exercise on the blank pages attached at the end of
practical.

IV Output (Take screen shot of the webpage created as output and attach it here)
…………………………………………………………………………………………
…………………………………………………………………………………………
V Conclusion
…………………………………………………………………………………………
…………………………………………………………………………………………

VI Assignment:
1. Enlist the different types of formats in ordered list?
2. Differentiate between bullet and number list in HTML?
3. Write HTML code for a definition list.

11
COPA Web Page Designing with HTML
Industrial Training Institute, Lower Parel, Mumbai-11.
Practical No. 7.5 Date

Name of Practical: Create a web page to Apply anchor tag forlinking Web
pages
Instructor Name Duration Trade C.O.P.A

Objective: At the end of this exercise you shall be able to:

1. Understand the concept of URL and Hyperlink.


2. Able to apply link and use their attributes in a web pages.
3. Able to link one web page to another Web page.

I Minimum Theoretical Background

Hyperlink is an element in HTML document that is used to link one web page
to another web page or different web page. This practical is useful to link different
web pages of same site, link different locations on the same web page as well as
specific location on different web page of same site.

URL: Every document on the Web has a unique address. This address is known
as Uniform Resource Locator (URL).Example of URL is as follows:
http://www.student.com/index.com

Hyperlink:

The <a > Tag: The anchor element is used to create hyperlinks between a source
anchor and a destination anchor. The source is the text, image, or button that links to
another resource and the destination is the resource that the source anchor links to.
The Most Important Anchor Attributes: There are anchor attributes to create
functional hyperlinks. These attributes are href, target.An href can do a lot more
than just link to another website.

 It can be used to link directly to any element on a web page that has been assigned
an id.
 It can be used to link to a resource using a protocol other than http.
 It can be used to run a script.

Example:

<a href="second_page.html">second page </a>

Adding a target attribute and _blank attribute to the link will tell the visitor‟s
browser to open the link in a new (blank) browser tab or window to render that code
in the browser, when a visitor clicks the link which will open in a new tab.

Example:

<p>Example of target attribute<a href=mailto:[email protected]


target="_blank">target</a> with us!</p>
12
COPA Web Page Designing with HTML
1. Procedure for Applying anchor tag for linking Web pages

Step 1:Create a web page with name “first_page” with following code

<!DOCTYPE html>
<html>
<body>
<h1>My First page</h1>
<p>Example of linking pages with HTML</p>
<a href="second_page.html">second page </a>
</body>
</html>

Step 2.Create a web page with name “second page” with following code

<!DOCTYPE html>
<html>
<body>
<h1>My second page</h1>
<p>Welcome to world of Hyperlinking with HTML</p>
</body>
</html>

Step 3: In browser type URL of first page and see the output.

2. Procedure for Linking within the document (HTML Links - Create a Bookmark)
HTML bookmarks are used to allow readers to jump to specific part of a Web page.
Bookmarks can be useful if webpage is very long.
Create a bookmark with the id attribute:

Ex:<h2 id="Link">Link in HTML</h2>

13
COPA Web Page Designing with HTML
Then, add a link to the bookmark ("Link in HTML"), from within the same page:

Ex: <a href="#link"> Links in HTML</a>

Step 1: Create a Web page as follows:


<!DOCTYPE html>
<html>
<body>
<p><a href="#link">Links in HTML</a></p>

<h2>Introduction of HTML</h2>
<p>This Point explains Introduction of HTML</p>

<h2>concept of Website</h2>
<p>This Point explains concept of Website</p>
<h2>Concept of URL</h2>
<p>This Point explains Concept of URL</p>

<h2>Images in HTML </h2>


<p>This Point explains Images in HTML</p>

<h2 id="link">Links in HTML</h2>


<p>This Point explains Links in HTML</p>

<h2>Tables in HTML</h2>
<p>This Point explains Tables in HTML</p>

<h2>Hyperlink in HTML</h2>
<p>This Point explains Hyperlink in HTML</p>

<h2>HTML list</h2>
<p>This Point explains HTML list</p>

<h2>HTML Headings</h2>
<p>This Point explains HTML Headings</p>

<h2>HTML paragraph</h2>
<p>This Point explains HTML paragraph</p>

<h2>HTML Frame</h2>
<p>This Point explains HTML Frame</p>
</body>
</html>

Step2: Open this web page with browser then you will get following output including link
named “Link in html”.

14
COPA Web Page Designing with HTML
Step 3: When we click on the link “Link in html” then cursor goes to “Link to HTML” point
on the same page.

3. Procedure for linking a specific location on different web page of same site.

Step 1: Create a web page with following code :

<!DOCTYPE html>
<html>
<body>
<h1> Hyper Text Markup language</h1>
<p><a href="link within page.html#link">Links in HTML</a></p>
</body>
</html>

Step2: Create another web page with book mark id. (destination page) as follows
Which include id of bookmark.

Step3: Open First web page on browser and click on the link. Then it directly link to
specific part of destination page.

15
COPA Web Page Designing with HTML
II Exercise
Create web pages for different branches of your college Link them on the home page.
Apply linking within a page and linking a specific location within different pages.

III „HTML‟ Code


Write HTML code for above exercise on the blank pages attached at the end of
practical.

IV Output (Take screen shot of the webpage created as output and attach it here)
…………………………………………………………………………………………
…………………………………………………………………………………………

V Conclusion
…………………………………………………………………………………………
…………………………………………………………………………………………

VI Assignment:
1. Write procedure for linking to a document in a different folder.
2. Write attributes of anchor tag with their meaning.
3. Explain Bookmark with its use.

16
COPA Web Page Designing with HTML
Industrial Training Institute, Lower Parel, Mumbai-11.
Practical No. 7.6 Date

Name of Practical: Create a web page to link an external page of different


web sites, email ID and change colors of links
Instructor Name Duration Trade C.O.P.A

Objective: At the end of this exercise you shall be able to:


1. Able to link created website with external websites
2. Able to apply mailto tag.
3. Able to change color of links

I Minimum Theoretical Background


When creating a website, there are several things one must have on each Web
page. HTML links are one of those things. HTML links do a variety of things for
website. Without HTML links one can't have a "website" and can't show visitors
moreinformation on the subjects that one want to talk about. There are 3 major types
of HTML links; external links, internal links, and links within the same page.
External HTML links are those HTML links that go to another website. Email and
color tag forlinks are also used in this process. This practical demonstrate above tags.

1. Create a web page to link an external page of different web site

External pages can be linked with a full URL.


Following example shows a full URL to link to a web page:

<a href="https://www.abc.com/html/page1.html">HTML Concepts</a>


2. Create a web page to link to an email ID:

Link to email ID allows visitors to send email from your website. It is easy for your
visitors to send questions or comments. While using <a> tag as an email tag, you will
use mailto:email address along with href attribute.
An email link would require the following code:

<a href="mailto:your email address">Email Me</a>

Following code combine all the options and allow visitor to send email with the
address, subject and text already entered.

<a href="mailto:[email protected]?subject=Regarding Program & body=Please send me a


copy of your new program!">Email Me</a>

3. Tags to change colors of links:

By default, a links will appear as follows (in all browsers):

 An unvisited link is underlined and blue


 A visited link is underlined and purple
 An active link is underlined and red

17
COPA Web Page Designing with HTML
<!DOCTYPE html>
<html>
<head>
<style>
a:link { color: green;}
a:visited {color: pink;}
a:hover {color: red;}
a:active {color: yellow;}
</style>
</head>
<body>

<p>You can change the default colors of links</p>


<a href="http://www.yahoo.com" target="_blank">HTML Images</a>
</body>
</html>

II Exercise
Write a HTML code to link an external page of different web sites like yahoo.com or
google.com using URL and also link web page to your mail address. Apply tags to change
colors of links.

III „HTML‟ Code


Write HTML code for above exercise on the blank pages attached at the end of
practical.

IV Output (Take screen shot of the webpage created as output and attach it here)
…………………………………………………………………………………………
…………………………………………………………………………………………

V Conclusion
…………………………………………………………………………………………
…………………………………………………………………………………………

VI Assignment:
1.Differentiate between active link and visited link.
2.List different types of URL?
3.Explain the use of Title attributes of anchor tag.

18
COPA Web Page Designing with HTML
Industrial Training Institute, Lower Parel, Mumbai-11.
Practical No. 7.7 Date

Name of Practical: Insert images on web page using various attributes

Instructor Name Duration Trade C.O.P.A

Objective: At the end of this exercise you shall be able to:


1. Insert Images in web page.
2. Format the Image with using various attributes.

I Minimum Theoretical Background


Images and graphics can be embedded into pages. It improves the appearance
of the web pages. This practical is useful for inserting an image in web page and
formatting the images with various attributes.Knowledge of HTML language tags
and attributes, Concept of Images with its formatsuch as JPEG images, PNG images
& GIF images and IMG tag with its attributes.

1. Inserting Images in HTML Documents:


In HTML, images are defined with the <img> tag.The syntax of <img> tag can be
given with:
<img src="url" alt="some_text" />

Attributes Description

src The „src‟ attribute contains a path pointing to the image which is
inserted into the page.
alt The „alt‟ attribute is a mandatory attribute which specifies an
alternate text for an image, if the image cannot be displayed.
2. Image formatting Attributes:

Attributes Description

width To set image width.


height To set image height.
align By default image will align at the left side of the page, „align‟ tag
used to align attribute to set it in the center or right.
border Use to specify border thickness in terms of pixels using border
attribute. A thickness of 0 means, no border around the picture.
hspace To insert the horizontal margin around the image. „hspace‟ used
for setting space left and right of image.
vspace To insert the vertical margin around the image. „vspace‟ used for
setting space above and below the image.

II Exercise
Design a web page using images and apply image formatting attributes on it.

III HTML Code


Write HTML code for above exercise on the blank pages attached at the end of
practical.
19
COPA Web Page Designing with HTML
IV Output (Take screen shot of the webpage created as output and attach it here)
…………………………………………………………………………………………
…………………………………………………………………………………………

V Conclusion
…………………………………………………………………………………………
…………………………………………………………………………………………
VI Assignment:
1. Explain the tag used to insert image in a web page.
2. Name the tag with attribute used to change the size of image.
3. Write procedure to insert border to the image?

20
COPA Web Page Designing with HTML
Industrial Training Institute, Lower Parel, Mumbai-11.
Practical No. 7.8 Date

Name of Practical: Implement image as a button or link and Set image as


background
Instructor Name Duration Trade C.O.P.A

Objective: At the end of this exercise you shall be able to:


1. Embed Images as button or link in web page.
2. Use Images as background in the web page.

I Minimum Theoretical Background


Image can be used as a hyperlink, simply by replacing the text hyperlink with image
code. Image can be set as a background in a web page to make site more attractive.
This practical demonstrate the use of image for linking web page with other web page
and as background in web pages.

1. Implement image as a button or link:


Image link are constructed by embedding an <img> tag inside of an anchor element
<a>.In HTML image links require opening and closing anchor tags with valid source
path of image. The syntax is as follows:

<a href=“ link path ”><img src=“ image source path” ></a>

For Example:

Two web pages are created by name as “practical9.html” and “page1.html”. First page
is link with second page by implementing image as link. By clicking on the image-link
created on first page, the second page will appears. The code for linking of both the
page by image as link is given below:
a) First web page-practical9.html

<html>
<head>
<title> Image as button </title>
</head>
<body>Image as a link/hyperlink:
<a href="C:\Users\Desktop\Practicals\page1.html">
<img src="C:\Users\Desktop\flower1.jpg” width="32" height="32" align="bottom" />
</a>
</body>
</html>

21
COPA Web Page Designing with HTML
b)Second web page-page1.html

<html>
<head>
<title> Page1.html </title>
</head>
<body>
<h1 align="center"> Hello!!! This is a new chapter </h1>
</body>
</html>
The First web page-Output of above HTML code as follows:

Second page output

2. Set image as background:


The background attribute can also be used to set the background of web pages. To set
an image in background of a web page, the valid source of image is required.
Following is the syntax to set image in background of page attribute with a body tag.
<body background =“valid source path of image”>

For example:

<body background=“mypattern.gif”>

II Exercise
Design a web page which include image hyperlink and set any image as a background
to the page.

III HTML Code


Write HTML code for above exercise on the blank pages attached at the end of
practical.
22
COPA Web Page Designing with HTML
IV Output (Take screen shot of the webpage created as output and attach it here)
…………………………………………………………………………………………
…………………………………………………………………………………………

V Conclusion
…………………………………………………………………………………………
…………………………………………………………………………………………

VI Assignment:
1. Describe the use of images in web pages.
2. Write the use of background attribute.
3. Explain the attributes used for setting the center alignment to the image.

23
COPA Web Page Designing with HTML
Industrial Training Institute, Lower Parel, Mumbai-11.
Practical No. 7.9 Date

Name of Practical: Create a Web page to implement Frame tags

Instructor Name Duration Trade C.O.P.A

Objective: At the end of this exercise you shall be able to:


1. Use frames and frameset to partition the contents of web site.
2. Adding different documents to different frames.
3. Follow safety practices.

I Minimum Theoretical Background


In HTML, a frame is used to display multiple web pages in the same web page, at a
time. Each frame in a window may be separated from the others with border. This
practical used to create a frame with its attributes.Concept of different types of
Frames with their attribute, Creating a frames using FRAMESET tag. The basic
concept behind frames is to:

 Use the „frameset‟ element in place of the „body‟ element in an HTML document.
 Use the „frame‟ element to create frames for the content of the web page.
 Use the „src‟ attribute to identify the resource that should be loaded inside each
frame.
 Create a different file with the contents for each frame.

For example:

Create four different HTML documents. Here‟s what the first will contain:

<!DOCTYPE>
<html>
<body>
<h1>Frame 1</h1>
<p>Contents of Frame 1</p>
</body>
</html>

The first document will save as frame_1.html. The other three documents will have similar
contents and follow the same naming sequence like frame_2.html, frame_3.html and
frame_4.html.
1. Creating Vertical Columns
To create a set of four vertical columns, use the frameset element with the cols
attribute. The cols attribute is used to define the number and size of columns
the frameset will contain. The value of „*‟ will cause to automatically sized to fill the
available space. Here‟s HTML markup looks like.

24
COPA Web Page Designing with HTML
<!DOCTYPE>
<html>
<frameset cols="*,*,*,*">
<frame src="../file_path/frame_1.html">
<frame src="frame_2.html">
<frame src="frame_3.html">
<frame src="frame_4.html">
</frameset>
</html>

And here‟s an example of how that HTML will render.

2. Creating Horizontal Rows


Rows of frames can be created by using the rows attribute rather than the cols attribute
as shown in the HTML below.

<!DOCTYPE >
<html>
<frameset rows="*,*,*,*">
<frame src="frame_1.html">
<frame src="frame_2.html">
<frame src="frame_3.html">
<frame src="frame_4.html">
</frameset>
</html>

By making that one change, the frames now load as four rows stacked up on top of each other.

25
COPA Web Page Designing with HTML
3. Mixing Columns and Rows
Columns and rows of frames can both appear on the same webpage by nesting
one frameset inside of another. To do this, first create a frameset and then nest a
child frameset within the parent element. Here‟s an example of how to nest two rows
within a set of three columns.

<frameset cols="*,*">
<frame src="frame_1.html">
<frameset rows="*,*">
<frame src="frame_2.html">
<frameset cols="*,*">
<frame src="frame_3.html">
<frame src="frame_4.html">
</frameset>

</frameset>
</frameset>

That code creates a set of two equally sized columns. Then split the second column into two
rows. Finally, Split the second row into two columns. Here‟s what that actually looks like.

26
COPA Web Page Designing with HTML
Element
Attributes Notes
Name
The <noframes> element was used within a parent
<frameset> to provide fallback content for users whose
noframes browsers did not support <frame> content. Frames have
been deprecated, so the <noframes> element should not
be in use on modern websites.
The <frameset> element was used to create a group of
frameborder frames which could be styled and controlled as a unit.
frameset cols
Frames have been deprecated and should no longer be
bordercolor
used.
src The <frame> element was used to break a single browser
name window into multiple independent browsing contexts.
marginwidth Frames have been deprecated and should not use by
frame scrolling
modern websites.
noresize
frameborder
bordercolor

II Exercise
Write HTML code to divide web page into 2 rows and second into 3 columns using
frameset and its attributes and showing text links in first column, ordered list in second
column and image in third column.

III HTML Code


Write HTML code for above exercise on the blank pages attached at the end of
practical.

IV Output (Take screen shot of the webpage created as output and attach it here)
…………………………………………………………………………………………
…………………………………………………………………………………………

V Conclusion
…………………………………………………………………………………………
…………………………………………………………………………………………

VI Assignment:
1. Write steps to create frame.
2. Explain different attribute that can be used with frame elements?
3. Write procedure to make a frame with vertical scrollbar but without a
horizontal scrollbar.

27
COPA Web Page Designing with HTML
Industrial Training Institute, Lower Parel, Mumbai-11.
Practical No. 7.10 Date

Name of Practical: Create a Web page to implement table tags

Instructor Name Duration Trade C.O.P.A

Objective: At the end of this exercise you shall be able to:


1. Apply table attributes to organize data on a web page.
2. Use the given table attribute to change default table setting.

I Minimum Theoretical Background


Tables are used to show tabular data i.e. information that is logically presentedin
rows and columns.In HTML, table is represented with the <table> tag. Each table
row is defined with the <tr> tag. A table heading is defined with the <th> tag. By
default, table headings are bold and centered. A table data/cell is defined with the <td>
tag. Use rowspan andcolspan tags.

Table 1: Table tags

<table>…<table> Indicates a table. The tags surround the entire table.


<tr>..</tr> Indicates a table row. The tags surround the entire row.
<td>…</td> Indicates table data or a cell. The tags surround the entire cell.
<th>…</th> Indicates table Heading

<table>
<tr>
<th>Name</th>
<th>Class</th>
<th>Marks</th>
</tr>

<tr>
<td> ABC</td>
<td>FY</td>
<td>50</td>
</tr>
</table>

28
COPA Web Page Designing with HTML
II Exercise
Write a program to create HTML table having border as below or similar table given
by teacher implementing above table tags.

III „HTML‟ Code


Write HTML code for above exercise on the blank pages attached at the end of
practical.

IV Output (Take screen shot of the webpage created as output and attach it here)
…………………………………………………………………………………………
…………………………………………………………………………………………

V Conclusion
…………………………………………………………………………………………
…………………………………………………………………………………………

VI Assignment:
1. List attributes used for formatting table.
2. Write a procedure to align a table to left or right.
3. Define cell padding and cell spacing.
Industrial Training Institute, Lower Parel, Mumbai-11.
Practical No. 7.11 Date

Name of Practical: Create a web page for demonstration of CSS byapplying


Internal/External/ Inline style
Instructor Name Duration Trade C.O.P.A

Objective: At the end of this exercise you shall be able to:


1. Describe the basic syntax and structure of CSS.
2. Use internal, external and inline CSS.
3. Apply styles to background, text, fonts and other HTML components.

I Minimum Theoretical Background


Cascading Style Sheet (CSS) is a simple mechanism of describing how
documents are presented on screens. Cascading Style Sheets (CSS) provide easy and
effective alternatives to specify various attributes for the HTML tags. This practical
demonstrate the use of CSS and improves in content accessibility.
CSS stands for Cascading Style Sheets and it is the language used to style
the visual presentation of web pages. CSS is the language that tells web browsers
how to render the different parts of a web page.

CSS Syntax-
CSS syntax includes selectors, properties, values, declarations, declaration blocks,rule
sets, at-rules, and statements.

 A selector is a code snippet used to identify the web page element or elements that
are to be affected by the styles.
 A property is the aspect of the element that is to be affected. For example, color,
padding, margin, and background are some of the most commonly used CSS
properties.
 A value is used to define a property. For example, the property color might be
given the value of red for example: color: red;.
 The combination of a property and a value is called a declaration.
 In many cases, multiple declarations are applied to a single selector. A declaration
block is the term used to refer to all of the declarations applied to a single selector.
 A single selector and the declaration block that follows it in combination are
referred to as a ruleset.
 At-rules are similar to rulesets but begin with the @ sign rather than with a selector.
The most common at-rule is the @media rule which is often used to create a block
of CSS rules that are applied based on the size of the device viewing the web page.

An Example of CSS Syntax-


Let‟s use a block of CSS to clarify what each of these items is.

h1 {
color: red;
font-size: 3em;
text-decoration: underline;
}
In this example, h1 is the selector. The selector is followed by a declaration block that
includes three declarations. Each declaration is separated from the next by a
semicolon. The tabs and line breaks are optional but used by most developers to make
the CSS code more human-readable.By using h1 as the selector, we are saying that
every level 1 heading on the web page should follow the declarations contained in this
ruleset. The ruleset contains three declarations:

 color:red;
 font-size: 3em;
 text-decoration: underline;

color, font-size, and text-decoration are all properties. There are literally hundreds of
CSS properties that can use, but only a few dozen are commonly used.
The color property can use a color keyword or a color formula in Hex, RGB, or
HSL format. In this case, the color keyword red. There are a few dozen color
keywords available in CSS3, but millions of colors can be accessed with the other
color models.

The value of 3em to the property font-size. There are a wide range of size units we
could have used including pixels, percentages, and more. Finally, the
value underline to the property text-decoration. The overline or line-through can be
used as values for text-decoration. In addition, CSS3 allows for the use of the line-
styles solid, double, dotted, dashed, and wavy was well the specification of text-
decoration colors.
Ways of Linking CSS Rules to an HTML Document
There are three ways of adding CSS rules to a web page:

 Inline styles
 Internal stylesheets
 External stylesheets

In the vast majority of cases, external stylesheets should be used. However, there are
instances where inline styles or internal stylesheets may be used.
 Inline Styles
Inline styles are applied to specific HTML elements. The HTML attribute style is used
to define rules that only apply to that specific element. Here‟s a look at the syntax for
writing inline styles.

<h1 style="color:red; padding:10px; text-decoration:underline;">Example Heading</h1>

That code would cause just that heading to render with red underlined text and 10
pixels of padding on all sides. There are very few instances where inline styles should
be used. In nearly all cases they should be avoided and the styles added to a stylesheet.
 Internal Stylesheets
The earlier examples in this tutorial make use of internal stylesheets. An internal
stylesheet is a block of CSS added to an HTML document head element.
The style element is used between the opening and closing head tags, and all CSS
declarations are added between the style tags.
<head>
<style>
h1 {
color: red;
padding: 10px;
text-decoration: underline; }
</style>
</head>
<body>
<h1>Example Heading</h1>
</body>

That code would produce the same results as the inline styles. However, the benefit to
using internal stylesheets rather than inline styles is that all h1 elements on the page
will be affected by the styles.
 External Stylesheets
External stylesheets are documents containing nothing other than CSS statements. The
rules defined in the document are linked to one or more HTML documents by using
the link tag within the head element of the HTML document.
To use an external stylesheet, first create the CSS document.

/*************************************************
Save with a name ending in .css such as styles.css
*************************************************/
h1 {
color: red;
padding: 10px;
text-decoration: underline;
}

Now that we have an external stylesheet with some styles, we can link it to an HTML
document using the link element.

<head>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<h1>Example Heading</h1>
</body>

When this HTML document is loaded the link tag will cause the styles in the
file styles.css to be loaded into the web page. As a result, all level 1 heading elements
will appear with red text, underlined, and with 10 pixels of padding applied to every
side.

II Exercise
Develop a web page using CSS for following web site page.

III HTML Code


Write HTML code for above exercise on the blank pages attached at the end of
practical.

IV Output (Take screen shot of the webpage created as output and attach it here)
…………………………………………………………………………………………
…………………………………………………………………………………………

V Conclusion
…………………………………………………………………………………………
…………………………………………………………………………………………

VI Assignment:
1. Explain different ways of adding style sheets files to HTML document?
2. Differentiate between internal and inline style sheet?
3. Explain the font property with syntax.
IT & ITES Exercise
COPA - JavaScript Embed JavaScript in HTML Pages
Practicing the JavaScript in creating dynamic HTML pages
Objectives: At the end of this exercise you shall be able to
• create javascript code in the <Head > section of HTML page
• create javascript code in the <Body > section of HTML page
• create javascript code in the <Head > and <Body> section of HTML page
• create and run sample JavaScript code.

PROCEDURE

TASK 1 : Create Javasscript code in the <Head > section of HTML page

Note to instructor : To run JavaScript, any modern browser should be installed as all modern browser
can run JavaScript by default.

1 Open Notepad. Fig 1


2 Type the following code.
<html>
<head>
<script>
function myFunction() {
document.write("hello");
document.write(" world");
} 13 A security warning can be shown (Fig 2).
</script>
Fig 2
</head>
<body>
<h1>My Web Page</h1>
<button type="button" onclick="myFunction()">Try
it</button>
</body>
</html>
14 Click yes.
3 Click Save. 15 Now click "Try it" to run the javascript code in the
4 Type filename as page1.html. page.
5 Select file type as All Files. 16 Hello World would be shown as output. (Fig 3).
6 Select destination in Desktop or any other location. Fig 3
Click Save.
7 Close Notepad.
8 Now go to the file destination.
9 Double Click it to run.
10 Browser can show you a warning. (Fig 1)
11 If warning is shown, click yellow warning bar.
12 Select Allow Blocked Content.
TASK 2 : Create Javasscript code in the <Body > section of HTML page

1 Write and save following code and save with


document.getElementById("p1").innerHTML = "New
access.html.
text!";
<html>
</script>
<body>
</body>
<p id="p1">Hello World!</p>
</html>
<script>
2 Run it by double clicking this file name.
3 It will show the following output.
New text!

TASK 3: Create JavaScript code in the <Head> and <Body> section of an HTML page.
1 Create and run the following JavaScript code.
2 Run the code and check the output.
<!DOCTYPE html>
<head>
<title> Script in head and body section </title>
<script type = “text/javascript”>
document.writeln(“Good Morning”);
</script>
</head>
<body>
<script type = “text/javascript”>
alert(“Good Evening”);
</script>
</body>
</html>

TASK 4: Create and run sample JavaScript code.


<!DOCTYPE html>
1 Create and run the following JavaScript code.
<html>
<!DOCTYPE html>
<body>
<html>
<img id="myImage" src="smiley.gif">
<body>
<script>
<h1 id="header">Old Header</h1>
document.getElementById("myImage").src=
<script> "landscape.jpg";
var element = document.getElementById("header"); </script>
element.innerHTML = "New Header"; </body>
</script> </html>
</body>
3 Change the Value of an Attribute
</html>
To change the value of an HTML attribute, use this
2 Create and run the following JavaScript code. syntax:
document.getElementById(id).attribute=new value

IT & ITES : COPA (NSQF 3)


IT & ITES Exercise
COPA - JavaScript Embed JavaScript in HTML Pages
Embed JavaScript in HTML to Display Information in Web pages
Objectives: At the end of this exercise you shall be able to
• use external javascript files in HTML
• display information with javascript.

PROCEDURE

TASK 1 : Using external JavaScript files in HTML

1 Open Notepad. 10 Click Save.


2 Type the following code. 11 Type filename as js2102.html
12 Select file type as All Files.
function myFunction() {
13 Select destination in Desktop or any other location.
document.write("hello");
Click Save.
document.write(" world");
14 Close Notepad.
}
15 Now go to the file destination.
3 Click Save. 16 Double Click it to run.
4 Type filename as myscript.js. 17 See the output as shown in Fig 1 & Fig 2.
5 Select file type as All Files. Fig 1
6 Select destination in Desktop or any other location.
Click Save.
7 Close Notepad.
8 Open Notepad again.
9 Type the following code. (Fig 2)

<html>
<head>
<script type="text/javascript" src=" myscript.js"> </
script> Fig 2
</head>
<body>
<h1>My Web Page</h1>
<button type="button" onclick="myFunction()">Try
it</button>
</body>
</html>
TASK 2 : Display information with JavaScript

1 Write the code and save it with jc21021.html.


Fig 3
<html>
<head>
<title>A Web page</title>
<script type="text/javascript">
function anotherAlert(textAlert) {
alert(textAlert);
}
anotherAlert("This is a alert");
</script>
<body>
<h1>Web Page with Alert</h1>
</body>
</html>
2 Run the code and see the output.(Fig 3)

IT & ITES : COPA (NSQF 3)


IT & ITES Exercise
COPA - JavaScript Embed JavaScript in HTML Pages
Use error handling techniques in JavaScript
Objectives: At the end of this exercise you shall be able to
• use try-catch in JavaScript
• use finally in JavaScript
• use throw in JavaScript
• use onerror() method in JavaScript.

PROCEDURE
TASK 1: Use try-catch in javascript

1 Open Notepad <body>


<p>Click the following to see the result:</p>
2 Type the following code
<form>
<html>
<input type=”button” value=”Click Me”
<head> onclick=”myFunc();” />
<script type=”text/javascript”> </form>
function myFunc()
</body>
{
var a = 100; </html>

try { 3 Click Save


alert(“Value of variable a is : “ + a ); 4 Type filename as ErrorHandling1.html
} 5 Select file type as All Files.
catch ( e ) { 6 Select desktop or any other location. Click Save
alert(“Error: “ + e.description ); 7 Close Notepad
} 8 Now run the html file to see the result(fig-1)
} 9 Click the Click Me button( fig-2)
</script>
</head>

Fig 1
TASK 2: Use finally in javascript
1 Open Notepad
<form>
2 Type the following code <input type=”button” value=”Click Me”
onclick=”myFunc();” />
<html>
</form>
<head>
</body>
<script type=”text/javascript”>
</html>
function myFunc()
{ 3 Click Save

var a = 100; 4 Type filename as ErrorHandling2.html

try { 5 Select file type as All Files.

alert(“Value of variable a is : “ + a ); 6 Select desktop or any other location. Click Save

} 7 Close Notepad

catch ( e ) { 8 Now run the html file to see the result (Fig-3)

alert(“Error: “ + e.description ); 9 Click on Click Me button (Fig-4)

} Fig 3

finally {
alert(“Finally block will always execute!” );
}
}
</script>
</head>
<body>
<p>Click the following to see the result:</p>

Fig 4

TASK 3: Use throw in javascript

1 Open Notepad 2 Type the following code

IT & ITES : COPA (NSQF – 3)


<html> </script>
<head> </head>
<script type=”text/javascript”> <body>
function myFunc() <p>Click the following to see the result:</p>
{
<form>
var a = 100;
<input type=”button” value=”Click Me”
var b = 0; onclick=”myFunc();” />
try{ </form>
if ( b == 0 )
</body>
{
</html>
throw( “Divide by zero error.” );
3 Click Save
}
4 Type filename as ErrorHandling3.html
else
5 Select file type as All Files.
{
var c = a / b; 6 Select desktop or any other location. Click Save

} 7 Close Notepad
} 8 Now run the html file to see the result (Fig-5)
catch ( e ) { 9 Click the Click Me button (Fig-6)
alert(“Error: “ + e );
}
}

Fig 5

Fig 6

IT & ITES : COPA (NSQF – 3)


TASK 4: Use onerror() Method in javascript

1 Open Notepad 3 Click Save


2 Type the following code 4 Type filename as ErrorHandling4.html
<html> 5 Select file type as All Files.
<head> 6 Select desktop or any other location. Click Save
<script type=”text/javascript”> 7 Close Notepad
window.onerror = function () { 8 Now run the html file to see the result (Fig-7)
alert(“An error occurred.”); 9 Click the Click Me button (Fig-8)
}
</script>
</head>
<body>
<p>Click the following to see the result:</p>
<form>
<input type=”button” value=”Click Me”
onclick=”myFunc();” />
</form>
</body>
</html>

Fig 7

Fig 8

IT & ITES : COPA (NSQF – 3)


IT & ITES Exercise
COPA - JavaScript Embed JavaScript in HTML Pages
Use objects and classes in JavaScript
Objectives: At the end of this exercise you shall be able to
• display add two numbers using function
• take input using prompt function
• take confirmation using confirm method
• using global variable.

PROCEDURE

TASK 1 : Display add two numbers using function


1 Open Notepad. 3 Click Save.
2 Type the following code. 4 Type filename as add1.html
5 Select file type as All Files.
<html>
<head> 6 Select destination in Desktop or any other location.
Click Save.
<title>Adder</title>
<script> 7 Close Notepad.
var a=4; 8 Now run the html file to see the result. (See Fig 1)
var b=6; Fig 1
var c=add(a,b);
alert(c);
function add(a,b) {
return a+b;
}
</script>
</head>
<body>
</body>
</html>

TASK 2: Take input using prompt function

1 Open Notepad. case 1:


2 Type the following code. r=add(a,b);
<html> break;
<head> case 2:
<title>Prompt</title> r=sub(a,b);
<script> break;
var a=prompt("Enter a Number:"); case 3:
var b=prompt("Enter another Number:"); r=mul(a,b);
var ch=+prompt("1->Add 2->Sub 3->Mul 4->Div break;
Enter Choice:"); case 4:
var r=0,fl=0; r=div(a,b);
switch(ch) { reak;
default: 6 Select destination in Desktop or any other location.
Click Save.
fl=1;
7 Close Notepad.
}
8 Now run the html file to see the result. (Fig 2 to Fig 5)
if(fl)
Fig 2
document.write("Invalid choice");
else
document.write("Result is "+r);
function add(a,b) {
return a+b;
} Fig 3
function sub(a,b) {
return a-b;
}
function mul(a,b) {
return a*b;
} Fig 4

function div(a,b) {
return a/b;
}
</script>
</head>
Fig 5
<body>
</body>
</html>
3 Click Save.
4 Type filename as calcul1.html
5 Select file type as All Files.

TASK 3 : Take confirmation using confirm method

1 Open Notepad. </head>


2 Type the following code. <body>
<html> </body>
<head> </html>
<title>Confirm</title> 3 Click Save.
<script> 4 Type filename as conf1.html
var a=confirm("Want to play a game?"); 5 Select file type as All Files.
if(a) 6 Select destination in Desktop or any other location.
document.write("We will play a game now!"); Click Save.

else 7 Close Notepad.

document.write("May be next time"); 8 Now run the html file to see the result. (Fig 6 to Fig 8)

</script> If Ok is selected.
If cancel is selected
IT & ITES : COPA (NSQF – 3)
Fig 6 Fig 8

Fig 7

TASK 4 : Using global variable

1 Open Notepad. 3 Click Save.


2 Type the following code. 4 Type filename as vari1.html
5 Select file type as All Files.
<html>
<body> 6 Select destination in Desktop or any other location.
Click Save.
<script>
7 Close Notepad.
function m()
8 Now run the html file to see the result. (Fig 9 )
{
window.value=100;//declaring global variable by Fig 9
window object
}
function n(){
alert(value);//accessing global variable from other
function
}
m();
n();
</script>
</body>
</html>

IT & ITES : COPA (NSQF – 3)


IT & ITES Exercise
COPA - JavaScript Embed JavaScript in HTML Pages
Describe Animation and Multimedia using JavaScript
Objectives: At the end of this exercise you shall be able to
• manual Animation
• automated Animation
• rollover with a Mouse Event.

PROCEDURE

TASK 1 : Manual Animation

1 Open notepad.
2 Type the following code

75
3 Click save Output

4 Type filename as animation1.html


Fig 1
5 Select file type as all files
6 Select destination in desktop or other location. Click
save
7 Close Notepad
8 Now run the html file to see the result (see Fig 1)

TASK 2: Automated Animation


1 Open notepad. 2 Type the following code

IT & ITES : COPA (NSQF – 3)


3 Click save Output

4 Type filename as animation2.html


Fig 2
5 Select file type as all files
6 Select destination in desktop or other location. Click
save
7 Close Notepad
8 Now run the html file to see the result (see Fig 2)

TASK 3: Rollover with a Mouse Event


1 Open notepad. 2 Type the following code

3 Click save Output


4 Type filename as animation3.html
Fig 3
5 Select file type as all files
6 Select destination in desktop or other location. Click
save
7 Close Notepad
8 Now run the html file to see the result (see Fig:3)

IT & ITES : COPA (NSQF – 3)


IT & ITES Exercise
COPA - JavaScript Embed JavaScript in HTML Pages
Develop dynamic HTML pages using JavaScript
Objectives: At the end of this exercise you shall be able to
• learn how to develop dynamic HTML Pages using JavaScript.

Requirements
Tools/Equipment/Machines
• A working PC with Windows
O.S., Text Editor (Notepad) &
Browser - 1 No./batch.

PROCEDURE

TASK 1: HTML Java script

1 Open Notepad. 8 Now go to the file destination.


2 Type the following code. 9 Double Click it to run.
<HTML> 10 Browser can show you a warning.
<head> 11 If warning is shown, click yellow warning bar.
<title> 12 Select Allow Blocked Content.
Method of a JavaScript 13 A security warning can be shown.
</title> 14 Click yes.
</head> 15 Now click "Try it" to run the javascript code in the
page.
<body>
16 Hello World would be shown as output.
<script type="text/javascript">
Output:
document.write("JavaTpoint");
</script>
</body>
</html>
3 Click Save.
4 Type filename as page1.html.
5 Select file type as All Files.
6 Select destination in Desktop or any other location.
Click Save.
7 Close Notepad.

TASK 2: JavaScript and HTML event

Ref Steps 1 to 16 - Task 1 DHTML with JavaScript


</title>

<html> <script type="text/javascript">

<head> function dateandtime()

<title> {
alert(Date()); Output:

}
</script>
</head>
<body bgcolor="orange">
<font size="4" color="blue">
<center> <p>
Click here # <a href="#" onClick="dateandtime();">
Date and Time </a>
# to check the today's date and time.
</p> </center>
</font>
</body>
</html>

TASK 3: JavaScript and HTML DOM

Ref Steps 1 to 16 - Task 1 document.getElementById("demo").innerHTML =


"A1";
<html>
} else if (x>80 && x <= 90) {
<head>
document.getElementById("demo").innerHTML =
<title> Check Student Grade "A2";
</title> } else if (x>70 && x <= 80) {
</head> document.getElementById("demo").innerHTML =
"A3";

<body> }

<p>Enter the percentage of a Student:</p> }

<input type="text" id="percentage"> </script>


<button type="button" onclick="checkGrade()"> </body>
Find Grade </html>

</button> Output:

<p id="demo"></p>
<script type="text/javascript">
function checkGrade() {
var x,p, text;
p = document.getElementById("percentage").value;

x=parseInt(p);

if (x>90 && x <= 100) {

IT & ITES : COPA (NSQF -3)


TASK 4: CSS with JavaScript in DHTML

Ref Steps 1 to 16 - Task 1 var element = document.get ElementById


('demo').style.color = newColor;
<html>
}
<head>
</script>
<title>
</body>
getElementById.style.property example
</html>
</title>
Output:
</head>
<body>
<p id="demo"> This text changes color when click
on the following different buttons. </p>
<button onclick="change_Color('green');"> Green </
button>
<button onclick="change_Color('blue');"> Blue </
button>
<script type="text/javascript">

function change_Color(newColor) {

TASK 5: DHTML CSS

Ref Steps 1 to 16 - Task 1 Output:

<html>
<head>
<title>
Changes current HTML element
</title>
</head>
<body>
<center>
<h1 onclick="this.style.color='blue'"> This is a
JavaTpoint Site </h1>
<center>
</body>
</html>

TASK 6: DHTML Events


Ref Steps 1 to 16 - Task 1 </title>
<script type="text/javascript">
<html>
function ChangeText(ctext)
<head>
{
<title>
ctext.innerHTML=" Hi JavaTpoint! ";
Example of onclick event
}

IT & ITES : COPA (NSQF - -3)


</script> <body>
</head> <form onsubmit="Submit_Form()">
<body> <label> Enter your name: </label>
<font color="red"> Click on the Given text for <input type="text">
changing it: <br> <label> Enter your Roll no: </label>
</font> <input type="Number">
<font color="blue"> <input type="submit" value="submit">
<h1 onclick="ChangeText(this)"> Hello World! </h1> </form>
</font> <script type="text/javascript">

</body> function Submit_Form()


{
</html>
alert(" Your form is submitted");
Output:
}
</script>
</body>
</html>
Output:

<html>
<head>
<title>
Example of onsubmit event
</title>
</head>

TASK 7: DHTML DOM

Ref Steps 1 to 16 - Task 1 </script>


</body>
<html>
</html>
<head>
<title> Output:
Example of DHTML DOM
</title>
</head>
<body>
<font color = "blue">
<p id="demo"> This text changes color when the
page loaded. </p>
</font>
<script type="text/javascript">
document.getElementById('demo').style.color =
"red";

IT & ITES : COPA (NSQF - -3)

You might also like