Sie sind auf Seite 1von 115

LAB

MANUAL
Course: CSC101-Introduction To ICT

Department of Computer Science

Learning Procedure
1) Stage J (Journey inside-out the concept)
2) Stage a1 (Apply the learned)
3) Stage v (Verify the accuracy)
4) Stage a2 (Assess your work)

CSC101 –Lab Manual 1


COMSATS Institute of Information Technology (CIIT)
Islamabad
Table of Contents

Lab # Topics Covered Page #

Lab # 01 Introduction to Microsoft Word 3

Lab # 02 Introduction to Microsoft Word 20

Lab # 03 Introduction to Microsoft PowerPoint 20

Lab # 04 Introduction to Microsoft Excel 20

Lab # 05 Introduction to Microsoft Excel 20

Lab Sessional 1

Lab # 06 Creating database table in MS Access 20

Lab # 07 Python: Introduction and tool installation 42


A “hello world” code
Variables, expressions and statements
Lab # 08 If-else structure 52
Nested if statement
Lab # 09 Strings 63

Lab # 10 String 68

Lab Sessional 2

Lab # 11 Loop 76

Lab # 12 Functions 84

Lab # 13 Functions 90

Lab # 14 Lists 93

Lab # 15 Tuples 93

Terminal Examination

CSC101 –Lab Manual 2


LAB # 01

Statement Purpose:
This lab will provide a hands-on experience of Microsoft Word. Some basic features and
functions of MS Word, which are mostly used while creating text documents, shall be taught
and practiced.

Activity Outcomes:
The lab will teach students to prepare different text documents by:

• Using different font styles, listing, and line and paragraph styles
• Creating and formatting tables

Instructor Note:
As a pre-lab activity, read Chapters1B and 10 from the book (Introduction to Computers by
Peter Norton, 6th edition (2013), McGraw Hill) to gain an insight about computer software
generally and text processing software, especially.

CSC101 –Lab Manual 3


1) StageJ(Journey)

Introduction
In computing, the term text processing refers to the discipline of mechanizing the
creation or manipulation of electronic text. Text usually refers to all the alphanumeric
characters specified on the keyboard of the person performing the mechanization. Text
processing involves computer commands which invoke content, content changes, and
cursor movement, for example to search and replace, format, generate a processed report
of the content, or filter a file or report of a text file.

Microsoft Word is word processing software that is used to manipulate a text document,
such as a resume or a report. Text is typically entered by typing and the software provides
tools for copying, deleting and various types of formatting. Some of the functions of MS
Word include creating, editing, saving and printing documents, copying, pasting, moving
and deleting text within documents, formatting text such as font type and style, creating
and editing tables, inserting elements from other software, such as illustrations or
paragraphs and, correcting spelling and grammar.

2) Stage a1 (apply)
Lab Activities:
Activity 1:
Create a new word document, save it on your Desktop and close it.

Solution:
1. Start MS Word.
2. The screen will display an empty document (New Word file).
3. Type the following paragraph.

Consider this sentence: “Computers are everywhere.” Does it


sound like an overstatement or a cliché? No matter how you
perceive the impact of computers, the statement is true.
Computers are everywhere. In fact, you can find them in some
pretty unlikely places, including your family car, your home
appliances, and even your alarm clock!

4. To save the file, click on Save button on the top left corner of the screen. You
can also use the shortcut keys (Ctrl + S) to save the file. The Save button can also
be reached by going to File tab on the top left corner.

CSC101 –Lab Manual 4


5. The Save As dialog box will appear. The cursor will be active in file name drop-
down box . Type a name for this new file. Name it MyDoc.
6. Select Desktop as saving location from left pane of Save As dialog
box. The location bar will now be set to Desktop .

7. Left click on the Save button at the right bottom of the dialog box.
Your file is now saved on Desktop.

8. Close the file by going to File tab and clicking on Close option .

Activity 2:
Open the file you created in Activity 1. Change the font face and size.

Solution:
1. Click on File tab . Select Open . The Open dialog box will
appear.
2. Set the location of the file you want to open. In this case, your file is located
on Desktop. Set Desktop as location from the left pane of dialog
box. The location bar will now be set to Desktop
.
3. Select the file MyDoc from the right pane of the dialog box. The file
name will appear in File Name drop-down box .
4. Right click on Open . The file will now be displayed on the screen.
5. Change the original text to following format.

Consider this sentence: “Computers are everywhere.”


Does it sound like an overstatement or a cliché? No matter how
you perceive the impact of computers, the statement is true.
Computers are everywhere. In fact, you can find them in some
pretty unlikely places, including your family car, your home
appliances, and even your alarm clock!

6. To make the above changes, first select C of ‘Consider’ using your mouse.
Change its font size to 18 or larger by selecting the size from Font Size option
. You can either select the small arrow or type in the desired font size in
the box.
7. Font size can be incremented or decremented by using Grow Font (Ctrl+>) and
Shrink Font (Ctrl + <) options respectively. You can see shortcut keys for
different options by moving cursor over that option.
8. Select “Computers are everywhere” using your mouse. Change the font face
to Algerian by selecting it from the font face box . You can either
use the small arrow or type in font name in the box. Font face will now be
selected to Algerian .
9. Save the changes by pressing Ctrl+Sor .
CSC101 –Lab Manual 5
Activity 3:
Change the case of the text to lowercase, UPPERCASE and other capitalization options.

cONSIDER this sentence: “COMPUTERS ARE EVERYWHERE.”


Does It Sound Like An Overstatement Or A Cliché? No matter
how you perceive the impact of computers, the statement is
true. Computers ARE everywhere. In fact, you can find them in
some pretty unlikely places, including your family car, your
home appliances, and even your alarm clock!

Solution:
1. Select ‘Consider’. From the toolbar/ribbon, click on small arrow besides change
case option . A list of options will appear. Select toggle case . This
will change all lower case letters to upper case and vice versa.
2. Select ‘Does it sound like an overstatement or a cliché?’ Click small arrow
again to display different case options. Select . This will change
the first letters of all words of this sentence to uppercase.
3. Select ‘are’ in the sentence ‘Computers are everywhere.’ Again, click the small
arrow and choose option . This will capitalize all letters of the selected
text.
4. Check remaining options and see the difference.
5. Save the document using or Ctrl+S.

Activity 4:
Use Bold, italics, underline, strike through, superscript and subscript options, and other
Font options and make following changes.

cONSIDER this sentence: “COMPUTERS ARE EVERYWHERE.”


Does It Sound Like An Overstatement Or A Cliché? No matter how
you perceive the impact of computers, the statement is
true.Computers ARE everywhere. In fact, you can find them in
some pretty unlikely places, including your family car, your
home appliances, and even your alarm clock!

Solution:
1. Using your mouse, select “Computers are everywhere.” Choose underline option
from the font toolbar. You can change different line styles by clicking on the
small arrow beside this option . You can alternatively press Ctrl+U for the
same.

CSC101 –Lab Manual 6


2. Select ‘Does It Sound Like An Overstatement Or A Cliché?’ Choose italics option
from the font toolbar. You can perform the same function by pressing Ctrl+I.
3. Select ‘consider’. Choose subscript option or press Ctrl+=.
4. Select ‘RE’ from ‘ARE’. Choose superscript option or press Ctrl+Shift++ keys.
5. Select ‘family car’. Choose strikethrough from font toolbar.
6. Select ‘home appliances’. Click on the bold option from the toolbar or press
Ctrl+B for bolding it out.
7. Select ‘the statement is true.’ Choose highlight option . You can pick a
different highlight color by using the down arrow with the option.
8. Select ‘alarm clock!’ using the mouse and right click on Font Color option .
You can find a variety of colors by using the down arrow.
9. If you want to clear all the text formatting, simply click on .
10. Save the document using or Ctrl+S.

Activity 5:
Using different paragraph options, write the given paragraph.
Consider this sentence: “computers are everywhere.” Does it sound
like

a. an overstatement or
b. a cliché?

No matter how you perceive the impact of computers, the


statement is true. Computers are everywhere. In fact, you can find
them in some pretty unlikely places, including

• your family car,

• your home appliances, and

• even your alarm clock!

Solution:
1. Create a new MS Word document. Write the given paragraph as you did in activity
1. Make it bold (Ctrl+B or select ).

Consider this sentence: “Computers are everywhere.” Does


it sound like an overstatement or a cliché? No matter how
you perceive the impact of computers, the statement is

CSC101 –Lab Manual 7


true. Computers are everywhere. In fact, you can find them
in some pretty unlikely places, including your family car,
your home appliances, and even your alarm clock!

2. Place your cursor after ‘like’ in line # 2. Press Enter from keyboard. Now position
the cursor after ‘or’ and press Enter. Place the cursor after ‘?’ and press Enter.
Select the following lines.

3. Select down arrow of Numbering option from Paragraph toolbar. You will

see different numbering styles/formats. Choose the following format.


4. Again select the same text. From the paragraph toolbar, click on the down arrow
of line and paragraph spacing . You will see different spacing options. Select
1.5. Try using other options too and note the difference.
5. Repeat step 2 for ‘your family car, your home appliances, and even your alarm
clock!’ to have them in new lines (as shown below). Select the text.

6. Choose Bullets option from the toolbar. You can change the style of bullets
by selecting the down arrow. Re-select the text and change the line and paragraph
spacing to 2.5 (as was done in step 4).

Activity 6:
Type-in the following text in either a new word document or an existing one, using
different paragraph options.

1. Main item # 1.

1.1. Sub-item 1.1.


1.1.1. Sub-sub-item 1.1.1.
1.1.2. Sub-sub-item 1.1.2.
1.2. Sub-item 1.2.
CSC101 –Lab Manual 8
2. Main item # 2.
3. Main item # 3.

Solution:
1. Write ‘1. Main item # 1’. Don’t forget to add single space after ‘1.’ by using the
spacebar on the keyboard. Press Enter from the keyboard. You will see that
numbering automatically starts. You can start numbering in any format, e.g.
1.1./a./ A) etc.
2. Add the remaining Main items, i.e. Main item # 2 and Main item # 3 using the same
procedure as of Step 1.
3. Once you are done with all the Main items, start with sub-items. Place the cursor
after ‘Main item # 1’ and press Enter. A new item # 2 will appear. Use backspace
key of the keyboard and delete the number 2. Now type ‘1.1. Sub-item 1.1.’ Don’t
forget to add a space after ‘1.1.’
4. Press Enter. A new numbered item 1.2. will appear on the document. Write ‘Sub-
item 1.2.’ after it.
5. Place the cursor after ‘1.1. Sub-item 1.1.’ Press Enter. Delete 1.2. by using the
backspace key from the keyboard. Write ‘1.1.1.’ and press spacebar once. This will
add another level of numbering. Write ‘Sub-sub-item 1.1.1.’ in front of 1.1.1.
6. Press enter and repeat step 4 for 1.1.2. item.

Activity 7:
Insert different pages in a Word document such as Cover page or a blank page. Cover page
is the first page of any document that displays the title, date, author name, organization
name, etc. Blank page is a new empty page that is added at the cursor position.

Solution:
1. Open MyDoc that was created in activity 1.
2. Select the Insert tab from the toolbar.
3. You will see different page options in the Page ribbon. Select Cover Page option

. The down arrow will display different styles of cover pages. Select any
format of your choice. A new cover page is now added to the start of your
document.
4. Edit different text boxes on the cover page, selecting them and filling in the
appropriate information.

CSC101 –Lab Manual 9


5. The cursor is at cover page. Now add a blank page by selecting from the
ribbon. A new page will be inserted after cover page.
6. Save the document.

Activity 8:
Insert following tables in the document. Table 1 should be inserted by selecting the
matrix from the option and Table 2 should be created by entering the number of rows
and columns in the Insert Table dialog box.
Table 1

Table 2
Introduction To Information And Communication
Technologies

Solution:
1. Open an existing document or create a new one.

2. From the Insert tab , select the Table option by clicking on its
down arrow. You will see matrix in the form of rows and columns. Roll your mouse
over this matrix and different numbers of rows and columns will be highlighted.
Select a matrix of size 3x4.
3. A table with fixed cell size will be inserted in the document where the cursor is
located.
4. Type in Table 1 in first cell of the table.
5. Write Table2 just below the table and press Enter.

6. Re-select Table option by clicking its down arrow. Select the option Insert
table at the bottom. Insert Table dialog box will appear as given
below.

CSC101 –Lab Manual 10


7. Write 5 in Number of columns box and 2 in Number of rows as shown above. You
can set the cell size in AutoFit behavior. Select AutoFit to contents. This will resize
cell size as you type-in text. Press OK.
8. A table will be inserted in the document at location where the cursor was placed.
Write Introduction to Information and Communication Technologies in
different cells (as shown in activity description). You can place cursor from one
cell to next by either using mouse or pressing the Tab key on your keyboard.
9. If your roll your cursor over the table, you will see different options to format table
by right clicking on .

3) Stage v (verify)
Home Activities:
Activity 1:
You are required to create your personal letterhead. It must include:
• Your name – use Word Art
• Your address
• Your phone number
• Your email
• Your website URL
• Graphics that pertain to you
The placement/location of the items is up to you. Letterheads must extend no more
than 2 inches from the top of the page. Display the ruler bar and adjust the vertical ruler
to the top of the page. Save as “letterhead your name”.
Activity 2:
Open the letterhead you created in activity 1. Resave (Save As) and name it “WPexer2
your name.” Type the letter below using the following instructions:
• Center the words “(your name) Corporation”
• Insert the date (do not type it in).
• Mr. Richardson’s name and address are single spaced.
• Underline the words “confirmation” and “9 p.m.”
CSC101 –Lab Manual 11
• Bold the words “no cost”, “November 25th”, “Norseman Inn” and “Cappy’s
Capers”
• Put approx. 4 blank lines after “Warmest regards” to allow space for a
signature
• Your first and last name are typed at the bottom
• Save

Your letterhead goes here

(Your name) Corporation


(Current date)

Ms. Patsy Richardson


123 Main St. Single spaced
Winnipeg, Manitoba
R2B 5F2

Dear Ms. Richardson

This letter is a confirmation of your request for a ticket to the Annual Fireman’s Ball.
Our corporation is happy to provide the ticket to you at no cost.

As you will note from the tickets, the Ball is being held November 25th at the Norseman
Inn and will begin promptly at 9 p.m. The famous band, Cappy’s Capers, will provide an
entertaining evening of dancing and comedy.

Thank you for allowing our company to be of service to you.

Warmest regards,

(Your name)

Activity 3:
Tabs can be left, or right aligned, centered or decimal tabs. All tabs can have dot leaders.
1. Type the exercise below down through (to and including) the first paragraph.
2. After you have typed the first paragraph, delete all tabs.
(On the Home tab or the Page Layout tab, click the Paragraph dialog box
launcher. In the Paragraph dialog box, click Tabs, click Clear all)
3. Before you start typing the line “Store # 1…, set the following tabs
Left tab 0.5” Centered tab 2”
Right tab 3.5” dot leader decimal tab 5.5”
4. Type the columns of information on the stores.
5. Save your document as “WPtabsA your name”

To: Tom Jennings

CSC101 –Lab Manual 12


From: (your name)
Re: Monthly report of widgets sold to date
Date: (use current date)

Tom, the following monthly sales figures seem to indicate that the new item we
are offering for sale is taking the market by storm. I would suggest that we
continue to advertise as originally planned.

Store#1 ClearWater #A459………………..$356


Store#2 Camrose B375…………………..205

Activity 4:
Create a blank invoice table as shown below.
• Use your own name
• Use your own graphics and type of business
• Shade the cells as shown
• Save as “Invoice Table your name”

CSC101 –Lab Manual 13


4) Stage a2 (assess)
Assignment:
Deadline: at the start of next lab

Write a paragraph about yourself. Include information about where you’re from, where
you went to school, and anything else you feel is appropriate. The format of the
paragraph should be left justified, single spaced with Times New Roman 12 pt font (no
underline, bold or italics). The paragraph must contain at least 100 words

CSC101 –Lab Manual 14


LAB # 02

Statement Purpose:
This lab will learn more features of Microsoft Word. Some basic features and functions of
MS Word, which are mostly used while creating text documents, shall be taught and
practiced.

Activity Outcomes:
The lab will teach students to prepare different text documents by:

• Inserting cover pages, pictures, headers/footers, word art, etc.


• Drawing various diagrams, using built-in shapes
• Using different page layout options

Instructor Note:
As a pre-lab activity, read Chapters1B and 10 from the book (Introduction to Computers by
Peter Norton, 6th edition (2013), McGraw Hill) to gain an insight about computer
software,generally, and text processing software, especially.

CSC101 –Lab Manual 15


1) StageJ(Journey)

Introduction
Word processing programs provides tools for creating all kinds of text based documents.
Word processors are not limited to working with text; they enable you to add images to
your documents and design documents. Using word processors, you can create long
documents with separate chapters, table of contents, index and other features. You can
also print your documents in customized styles.

2) Stage a1 (apply)
Lab Activities:
Activity 1:
Insert a picture to the document. Apply different options to it.

Solution:
1. Open an existing Word document or create a new.
2. Place the cursor on a location on the page where the picture should be inserted.

In the Insert tab , select Picture from the Illustrations ribbon. An


Insert Picture dialog box will open.
3. Go to the location where the picture is saved in the computer. Select the picture
from the right window and select Insert button . You can also click
on the down arrow on the button to see different insert options.
4. The selected picture will be inserted to the document where the cursor was
located.

5. Click on the Picture Tools tab , available on top of the window/screen.


Format tab will now be visible, displaying several picture related
formatting options.
6. Try formatting the picture by applying different styles from the style ribbon

.
7. Add border to the picture by selecting Picture Border’s down-arrow
.

CSC101 –Lab Manual 16


8. Different picture effects can be applied using .
9. Insert another picture following same steps; however, this time, try inserting the

picture in the middle of a paragraph. Try different Position and Wrap Text

options to the picture and see the difference.


10. Select one of the pictures in the document. Go to Picture Tools and then Format

tab. Use the crop feature to crop the picture. Also rotate your picture 90
degrees anticlockwise using either Rotate option in the toolbar or
rotating the green circle over the picture using the mouse.
11. Save the document.

Activity 2:
Insert drawing canvas and draw the given diagram using different shapes. Group the
different shapes used to make one.
Hello

Solution:
1. Open an existing word document or make a new file.
2. Place the cursor on a location on the page where you want to insert canvas.

3. From the Insert tab , select Shapes option by clicking its down-
arrow. A list of different shapes will appear.
4. Select Rectangle under Basic Shapes group . Now draw this
rectangle, of any size, on the page using mouse.

5. Now select an arrow from Lines group and draw a line from the lower mid
of the rectangle downwards.
6. Now select a circle from Basic Shapes group and draw it just below
the arrow.

CSC101 –Lab Manual 17


7. If you want to format any shape, click on the shape. Drawing Tools option

will appear on over the toolbar. Select this option and different
format options will be available to format the selected shape. Alternatively, you
can select a shape and click right on it. Different format options will appear.

8. Right click on the drawn rectangle and select Add Text feature . Now
write Hello inside Rectangle. You can format text (change color, style, size etc.),
as done in previous activities.
9. To group all the shapes, click on rectangle first. It is now selected. While keep
pressing Ctrl key on your keyboard, move cursor on arrow. An arrow with a plus
sign will appear. Select the arrow too. Remember to keep pressing Ctrl key.
Now move cursor near the circle. Select it when you see an arrow with a plus. Now
all the shapes you have drawn on the canvas have been selected. Relieve the Ctrl
key.

10. Move mouse over the diagram and see when you get cross arrow . Right click
and choose Grouping and then Group .All
the shapes have now been grouped together to make a diagram. You can now
drag/rotate the diagram as a whole.
11. Save the document.

Activity 3:
Insert a header, footer, page numbers and a math’s equation (A = πr 2 ) in a Word file.

Solution:
1. Open an already existing file.

2. Go to Insert tab. Click on the down-arrow of Header option in Header &


Footer section. A list of header options will appear. Select a header of your choice
and you will header on every page of your document.
3. The header can be edited and formatted by using different options in Header &

Footer Tools . When you are finished, choose close header and

footer .
4. You can insert footer to your document by following the same steps. Click on the

footer option in the Insert tab. A list of footer styles will appear. Select one.

CSC101 –Lab Manual 18


5. Design the footer by using different features of Header & Footer Tools. Once
designed, close the header and footer.
6. For inserting page numbers, go to Insert tab and select down arrow on Page

Number option . Different options will appear. Select Top of Page


. Then, among different styles, choose one style of your
choice.
7. Page numbers can be formatted by selecting Format Page Numbers option
. Header & Footer Tools also let writers to format page
numbers.
8. For inserting the given math’s equation, place the cursor at the appropriate place
on page. In the insert tab, there is a Symbols section. Select the down arrow of

Equation option . There are many built-in equations.

9. Select Area of Circle and that equation will be inserted into the
document. You can edit the equation as well by overwriting with your own
variables.

10. When the equation is selected, Equation Tools will appear on top
of the window. This will let you format the selected equation by applying different
options, such as using different symbols and structures (fraction, script, radical,
integral, large operator, bracket, function, limit and log, matrix, etc.).
11. Save the document and exit.

Activity 4:
Design the layout of document pages. Apply different themes, setup page, and page
background.

Solution:
1. Open an existing Word document or make a new Word file.
2. Go to Page Layout tab . On the left-most side of the toolbar, there is

a Themes option . Click on its down arrow and choose a theme for your page.

CSC101 –Lab Manual 19


This option will change the overall design of the entire document, including colors,
fonts and effects.
3. You can also customize color, font, or effects under a theme by selecting Colors
, Font , and Effects options respectively.
4. In the page layout tab, you will find Page Setup section that will enable you to

setup page margins , change page orientation (portrait or landscape)

, page size , and page columns that will split the text into
two or more columns. Try applying these options.
5. In the same ribbon, you can number every line of your document by using Line
Numbers option .
6. In the same Page Layout tab, there are various options for designing the

background of pages. Watermark option will insert ghosted text behind


the content of the page. You can change the color of the page by utilizing the Page

Color option . Borders can be inserted too by using the Page Border option

.
7. Apply these features and save the document.

Activity 5:
Write a paragraph and create four copies of the paragraph by copying the text. Insert a
page break before each paragraph so that the first page is blank. Insert a line before
each paragraph and type a heading line such as “Paragraph 1”, “Paragraph 2”, etc. Set
the style of each heading line to be Heading 1.

Solution:
1. Left-click three times to highlight the entire paragraph.
2. Write click the selected paragraph and select Copy (or Ctrl-C) followed by Paste
(or Ctrl-V) to create copies of a paragraph.
3. Select Insert > Pages> Break > Page Break to insert a page break.

*****************
CSC101 –Lab Manual 20
4. Left-click three times to highlight the heading line.
5. Select “Heading 1” from the main toolbar of Styles on the home tab.
6. Repeat step 4 & 5 for all paragraphs.
7. Create individual styles for each of the five paragraphs. You are not printing this
file, so be creative with colors, animations, etc.

Activity 6:
Create, update and remove table of contents.

Solution:
1. On the References tab, in the Table of Contents group, click Table of Contents,
and then click Insert Table of Contents.


2. In the Table of Contents dialog box, do any of the following:
3. To change how many heading levels are displayed in the table of contents, enter
the number that you want in the box next to Show levels, under General.
4. To change the overall look of your table of contents, click a different format in
the Formats list. You can see what your choice looks like in the Print Preview and
Web Preview areas.
5. To change the type of line that appears between the entry text and the page
number, click an option in the Tab leader list.
6. To change the way heading levels are displayed in the table of contents, click
Modify. In the Style dialog box, click the level that you want to change, and then
click Modify. In the Modify Style dialog box, you can change the font, the size, and
the amount of indentation.
7. Repeat step 1 and step 2 for each heading style that you want to include in the
table of contents.
8. Click OK.
9. Choose a table of contents to fit the document type:
10. Printed document If you are creating a document that readers will read on a
printed page, create a table of contents in which each entry lists both the heading
and the page number where the heading appears. Readers can turn to the page
that they want.

Update the table of contents

CSC101 –Lab Manual 21


1. If you added or removed headings or other table of contents entries in your
document, you can quickly update the table of contents.
2. On the References tab, in the Table of Contents group, click Update Table.


3. Click Update page numbers only or Update entire table.


4. Delete a table of contents
5. On the References tab, in the Table of Contents group, click Table of Contents.


6. Click Remove Table of Contents.

Activity 7:
Insert references.

Solution:
1. Click References tab
2. Click Manage Sources on the Citations & Bibliography menu
3. Either Copy sources from the Master List to the Current List or create New
sources that will automatically be added to both the Master and Current List
4. Sources in the Current List will be shown in the dropdown Insert Citation list
make your selection.
5. Enter information for each source.
6. Once all your sources are entered, close the window.
7. Select Style on the Citations & Bibliography menu and choose the appropriate
style (typically APA but differs with professor; for Swasy, choose Chicago)
8. Click the Bibliography dropdown list and select Insert Bibliography
9. The bibliography will appear in your Word doc.
10. Edit accordingly (most bibliographies are double spaced)

Activity 8:
Cite references

Solution:

CSC101 –Lab Manual 22


1. Click References tab
2. Click Insert Citation from the Citations & Bibliography menu and select
appropriate source from the dropdown list
3. Make sure you have selected the appropriate style from the Style section of the
4. Citations & Bibliography menu

3) Stage v (verify)
Home Activities:
Activity 1:
Draw the figure given below. Use different shapes and group them.

Activity 2:
A flyer is a pamphlet, which is a form of paper advertisement intended for wide
distribution in a public place, handed out to individuals or sent through the mail.

Consider you work at a company. Your boss has asked you to prepare a flyer that
advertises company’s major products and/or services.

Two sample flyers are given below.

CSC101 –Lab Manual 23


4) Stage a2 (assess)
Assignment:
Deadline: at the start of next lab

Create a short report of 6 pages. Apply the following features:


• Header, Footer
• Headings, sub headings
• Images
• Table of contents
• References (also cite the references)

CSC101 –Lab Manual 24


LAB # 03

Statement Purpose:
This lab will provide a hands-on experience of Microsoft PowerPoint. It is a software
package used to display information in the form of a slide show. A slide show is a presentation
of a series of still images on a projection screen or electronic display device, typically in a
prearranged sequence. Some basic features and functions of MS PowerPoint, which are
mostly used for creating slideshow presentations, shall be taught and practiced.

Activity Outcomes:
The lab will teach students to prepare different presentations by:

• Using different slide layouts and inserting multiple slides in a slide show
• Inserting text and drawing, just as you have been taught in Lab 01
• Creating and formatting tables
• Inserting pictures, headers/footers, word art, etc.
• Drawing various diagrams, using built-in shapes
• Using different design options, such as slide orientation, themes, etc.
• Adding Transitions to slides and setting style and timing of each transition
• Adding Animation to the slides

Instructor Note:
As a pre-lab activity, read Chapters1B and 10 from the book (Introduction to Computers by
Peter Norton, 6th edition (2013), McGraw Hill) to gain an insight about computer software.

CSC101 –Lab Manual 25


1) StageJ(Journey)

Introduction
PowerPoint presentations consist of a number of individual pages or "slides". The "slide"
analogy is a reference to the slide projector. Slides may contain text, graphics, sound,
movies, and other objects, which may be arranged freely. The presentation can be
printed, displayed live on a computer, or navigated through at the command of the
presenter. For larger audiences the computer display is often a video projector. Slides can
also form the basis of webcasts.

PowerPoint provides three types of movements:

• Entrance, emphasis, and exit of elements on a slide itself are controlled by what
PowerPoint calls Custom Animations.
• Transitions, on the other hand, are movements between slides. These can be
animated in a variety of ways.
• Custom animation can be used to create small story boards by animating pictures to
enter, exit or move.

2) Stage a1 (apply)
Lab Activities:
Activity 1:
Start MS PowerPoint.

Solution:
1. Click the Start button
2. Click on Microsoft Office PowerPoint on the Programs menu. If you don’t see it
there, go to Microsoft Office group first.
3. Once you run the program, you will get a new window on the right side of the
screen with several sections. Each section has different options.

The main part of the screen is divided into two sections. The main section shows the
current slide, while on the left, slide miniatures appear, allowing you to see the
current slide in its context.

CSC101 –Lab Manual 26


In the top left corner of the screen is the Quick Access Toolbar which contains icons
to common commands, e.g. save and undo. Below this is the Ribbon, with tabs along
the top. Each tab has a set of icons which are used to give instructions to PowerPoint.
Currently the HOME tab is displayed.

At the very bottom of the window, is the Status Bar. This shows various information,
e.g. which slide you are currently looking at (here you are on slide 1) and the language
you’re working in. On the right-hand side of the Status Bar are icons to change the
view of the slides and to zoom in or out.

Activity 2:
Use Design themes.

Solution:
If you are creating a new presentation:

You could use a template different from the ones given to you by default. We go to the
website http://office.microsoft.com/en-us/templates/ and search for the Template
CSC101 –Lab Manual 27
Fireworks (Equivalent of Theme Fireworks in the new version of PowerPoint). Of the
several search results that you obtain, click and download the one for PowerPoint 2003
(It is compatible with 2010). If there is a problem, read the instructions on how to
manually download it, and the need for uncompressing the file. Remember the location
where you saved it, because you need to go back to it. The file will have a fileextension of
POT.

1. In the Design section, left click on the bottom arrow on the right of the Themes

. Select “Browse for Themes”, and look in the folder where you
placed the Fireworks template. Select it
2. You can search for a different theme, also known as template on the same website,
to use it for your slides.

If you want to apply a template to an existing presentation:

1. Open the presentation to which you want to apply the template.


2. Click the Design option on the main menu. The Apply Design Template box
opens at the right side of your screen with the small version of the templates.
3. Click on the Template you wish to use for your slides.

Activity 3:
View the PowerPoint window.

Solution:
When you open a presentation or create a new one you will see four main areas on the
screen:

1. Slides /Outline Tab: it is located on the left hand side of the screen.

a. If you click the Outline tab:

• It will display your presentation text in the form of an outline, without the
graphics.
• It is easy to move text on or among slides by dragging text to reorder the
information
b. If you click the Slides tab:
• It will display the slides of your presentation as small images, called thumbnails.
• You can quickly navigate through the slides in your presentation using this tab.
• You can also add, delete, or rearrange slides on this tab.

CSC101 –Lab Manual 28


2. Slide Pane: it is located at the center of the screen, next to the Outline pane. It
containsthe current slide of your presentation, where the cursor is. The slide will
display the text, graphics and background design.
3. Notes Pane: it is located right below the Slide pane. This pane allows you to
typespeaker notes for your reference. They are used as reminders you want to make
during the presentation, though they are not visible to the audience.
4. Task Pane: The Task Pane is a docked window within thePowerPoint interfacethat
provides more options than normal dialog boxes. The Task Pane is not always visible.
If you want it to appear, click on the Insert menu, and then in the Clip Art item.

At the bottom right corner, there is a set of buttons , collectively called View
buttons. These buttons allow you to quickly switch between PowerPoint views. They are
(from left to right):
• Normal View button: it displays the standard size for the Outline, Slide and Notes
panes.
• Slide Sorter View button: it displays a smaller version of all your slides. If you
havemore slides that what you actually see on the screen, you can scroll down
to see the rest. You see neither the Outline nor the Notes panes.
• Slide Show button: it starts your presentation. You will see your slides one by
one, withslide transitions, special effects, video, and audio clips if you included
any of them.

Activity 4:
Save the presentation.

Solution:
11. Go to the File menu and click Save As. Select a “PowerPoint Presentation”
12. In the File name textbox, type the name that you want to give to your presentation.
13. Click on the Save in list arrow and select the storage device where you want to
save your presentation.
14. In the Save as type the extension pptx will appear. Click on the Save button.

NOTE: If you want to save an existing presentation you will use SAVE, unless you want to
save it under a different name. Then you will use the SAVE AS option.

Activity 5:
Close presentation and exit the program.

Solution:
7. Click on the File menu and select the Close option.
8. Click Yes, if necessary (if you want to save your work)
9. Click on the Microsoft Office button and select the Exit PowerPoint option.
Microsoft PowerPoint will terminate.

CSC101 –Lab Manual 29


Activity 6:
Enter slide text on a slide.

Solution:
7. When you have a new slide, you will see something like “Click to add title” or
“Click to add text”. Move the mouse pointer to that area.
8. Click on that area. The insertion point, a blinking vertical line, indicates where
your text will appear in the title or text placeholder.
9. When you finish typing, click outside the area.
10. Or you can go to the Insert Menu, and select Text Box. Place the cursor where you
want to insert the text, and make your box.

Activity 7:
Create a new slide.

Solution:
1. Click the New Slide button on the Home menu. Choose the Layout of your slide
among the different layout schemes that appear when you click on Layout.
2. Each layout will display the layout’s name (E.g. Title and Content).
3. Click on the desired layout. For example: Title and Content, and select Clip Art.

CSC101 –Lab Manual 30


Activity 8:
Work in Outline view.

Solution:
1. Whenever you see the slide icon in the Outline pane, it means that whatever text
you see or type next to it represents the slide’s title.
2. On the Paragraph section of the main menu, you will find among all the buttons,

theIncrease Indent and Decrease Indent buttons. They look like this:
a. Decrease Indent: If it is enabled, you can move an item up the
hierarchy.For example if you have the following outline:
i. Games
ii. WarCraft II
iii. Diablo II
iv. System Shock
If you select item i, then click Decrease Indent, would make the outline look
like this:
a. Games
i.WarCraft II
ii. Diablo II
iii. System Shock
b. Increase Indent: If it is enabled, you can move an item down the
hierarchy. Forexample if you have the following:

1. Hardware
2. Software
3. Application Software
4. System Software
If you select items 3 and 4 and click the Increase Indent button, the
outline would look like this:

1. Hardware
2. Software
a. Application Software
b. System Software

Activity 9:
Enter Notes for slides.

Solution:
12. Go to the slide, where you want to have a reminder.
CSC101 –Lab Manual 31
13. Click in the Notes pane. The Notes pane is at the bottom of the screen, below the
slides pane.
14. Type the notes that you wish to use as a reminder
15. Click outside the Notes pane area to finish.

Activity 10:
View your presentation.

Solution:
There are three view choices in PowerPoint: Normal, Slide Sorter, and Slide Show
View. You can access these views under the View Menu at top or by clicking on the view

icons at the bottom of the screen :

1. NormalView: This is the main work window. In this view you can easily
edit your slide, create a background color, insert a picture, format a picture, insert
text and/or format text.

2. Slide Sorter View: This view shows thumbnails of every slide in your
presentation, like a light table. You can move slides around (click once and
highlight, then drag), delete slides and choose where to add new slides.

In the Slide Sorter view, click once the slide to select/ highlight it. Then drag and
release where you want your slide to go. You will see a thin line appear as you

CSC101 –Lab Manual 32


move your cursor—this indicates where the slide will appear when you release
your mouse button. You can also do this in the left sidebar of the Normal View.

3. Slide Show View:In the Slide Show tab, you can see different options for viewing

the slides e.g. you can view presentation from the start or from the

current slide .You can view your slides just as they will appear during a
presentation. To view the whole show from the beginning, you can also use Slide
Show View show from the top toolbar. If you select this (instead of the toolbar
icon), you will see a small triangular tool in the lower left. Click on this and it will
give you other options. One nice option is Pointer Options. This allows you to use
a pen or pointer tool as you show your presentation.

Activity 11:
Add a background to your slide.

Solution:
12. From the Design menu on top toolbar click Background.
13. In the Format Background dialogue box click on the pull down color menu to see
your color options.
14. Black is recommended for the background. Choose a color or click on More Colors.
If you want to apply this color to the background of ALL YOUR SLIDES click Apply
to all.

CSC101 –Lab Manual 33


Activity 12:
Add a grid display to your working view. Insert a picture to the grid. Adjust the picture
(size, position, adjustment).

Solution:
8. Go to View tab.
9. Check box for gridlines.
10. Click the Insert tab, click Picture.
11. Browse to find picture and select it.

CSC101 –Lab Manual 34


12. Size of picture: Select your picture by clicking on it once. You will see the circular
“handle bars” outlining the image. To enlarge or make the image smaller, simply
position your mouse over a corner circle. It will change to a double-headed arrow;
click and drag. Always use a “corner” handle and drag diagonally. This will
maintain the aspect ratio of the image and not distort it.
13. Position on slide: Make sure your object is selected (the “handle bars” should be
showing). When you move your cursor into the center of the image, it will turn
into a 4- headed arrow. Now you can move the entire image around on your slide-
simply click and drag the picture to the desired location. You can also use your
keyboard arrow keys to move the object up and down and side to side.
14. Picture Tools: Select the picture to see the Picture Tools tab. Click Picture Tools
to see options.

In the “Adjust” box you can choose to make changes to your images such as
brightness, contrast and color.This is also where the “Compress” function is
found. Use Compress to reduce the size and resolution of an image and of your
presentation. For details, click the help icon and search “Reduce file size of a
picture”.

Cropping reduces the picture by removing part of the image at an edge. You can
crop by clicking crop on the Picture Tools Ribbon and using the Crop handles
that appear. You can also crop to a specific size or rotate the picture by clicking
the arrow at the lower right corner of the size box on the ribbon to get the size
dialog box.

CSC101 –Lab Manual 35


Activity 13:
Add text; format it.

Solution:
1. Select Insert tab and click Text Box.
2. Click where you want your text box and the box will appear. Grab a corner to
resize the box. You can resize and move the box after you have added your text.

3. Highlight the text. On the Home Tab, Select font and size and color. Other options
are also found here. When your text box is active, you can click on the Drawing
Tools Tab for more options.

Activity 14:
Add a hyperlink.

Solution:
A Hyperlink allows you to connect to another slide, a web page or a file.
1. Select the text or object that you want to use as a hyperlink.
2. On the insert tab, select Hyperlink.
3. In the hyperlink dialog box you can click theBrowse the Web .icon or just fill
in the url in the address box. It is wise to copy and paste long urls to avoid typos.
Always test your hyperlinks in your presentation.

CSC101 –Lab Manual 36


Activity 15:
For acquiring a folder of images, use photo album feature.

Solution:
This allows you to take a whole folder of images and bring them all in at the same time,
correctly sized.
1. Go to the Insert tab, and select Photo Album.
2. Select “File/ Disk” button and locate the file folder which you want to import.
Open the folder and select all the items (click on them using mouse and the shift
key). Now click on the Insert button. Select (highlight) images and click “Insert”
button. You should now see the dialog box.
3. Make sure “Fit to slide” is selected in the Picture layout box, and click on the
Create button. You will now have one slide for each image file, sized to the slide.
4. To change all the backgrounds to black, simply follow the steps outlined above
for Add a Background (color) to Your Slide and “Apply to all”.

CSC101 –Lab Manual 37


Activity 16:
Create following two slides by following the above activities.

Now create following four slides (starting from left to right, then downwards) in the
same way, choosing the correct layout as you proceed.

CSC101 –Lab Manual 38


Solution:
1. Create first two slides as you created slides in previous activities.
2. For slide 3, right click on slide miniature in the left pane and choose Duplicate
Slide. Modify the text.
3. On slide 4, a Two Content slide layout is used. In each content box, there are
some sub-bullet points: One below Microsoft Office and second under Other
Programs. For this, type the main list item, press Enter to add a new main bullet
point. Press Tab or click on the Increase list level button to set a sublevel
bullet. Type in the required text and press Enter. Repeat.
4. For slide 5, a Tile and Content layout is used. In the content box, click onInsert

Chart icon or use Insert Chart icon in the Insert tab to choose a pie
chart. The original date in the pie chart was changed through the table that
appears, and the Quick Layout button on the Chart Tools Design tab was used
to get percentages.
5. On slide 6, a Tile and Content layout is used. An organization chart is produced.

a. In the content box, click on theInsert SmartArt Graphic icon or

from the Insert tab, choose the same .


b. Within the Choose a SmartArt Graphic window, click on Hierarchy on
the left
c. Select the first Organization Chart layout on the right and click [OK]
d. Enter the information that you want in the boxes - to add/cut boxes or
shapes, right click on them then choose the appropriate option from the
shortcut menu (you can also <Delete> them)

CSC101 –Lab Manual 39


Remember to save the latest version of your presentation - press <Ctrl+S>. At this point,
it’s also worth doing a spell check on your presentation – to do this, move to the REVIEW
tab and then click on the [Spelling and Grammar] button on the left.

Activity 17:
Use guides, gridlines and rulers again.

Solution:
When creating your slides, the placeholders have largely been left in their default
positions. Often, people move them around slightly, usually to cram extra information
onto a slide. This isn’t good practice – not only do you end up with too much on a slide
but the consistency of layout is lost. If you do need to do this then it’s better to do so on
the Master Slide (see later) but it also helps if you display the Rulers and Guides. To do
this:
1. Right click on a slide and choose Ruler – a ruler appears at the top and left
2. Right click again and this time choose Grid and Guide - the following dialog box
appears:

3. Turn on Display grid on screen and Display drawing guides on screen – press
<Enter> for [OK]
The guides are the lines which split the slide exactly into quarters, while the default grid
is shown by dotted lines 2cm square. Each dot represents 0.4cm. Objects are lined up with
the grid; to see this:
4. Click on the Title placeholder (Training on Microsoft Office) on slide 6 then press
<Esc>
5. Use the arrow keys to move the placeholder slightly. Note: If you have Snap objects
to grid turned on, each key press moves it 0.2cm (a grid setting) exactly
6. Move the placeholder back to its original position – or use <Ctrl+z> to [Undo] the
changes
7. To hide the grid, repeat step 2 then turn off Display grid on screen – press
<Enter> for [OK]

CSC101 –Lab Manual 40


Activity 18:
Delete and Hide slides.

Solution:
It's easiest to delete slides in Slide Sorter view (though you can also do so in Normal
view), especially if you have a lot of slides to deal with:
1. Click on the [SlideSorter] button (either on the Status Bar or VIEW tab)
2. Click on the slide to be deleted (e.g. slide 4, Training Topics) then press the
<Delete> key
3. To reinstate the deleted slide (you were just practising), press <Ctrl z> for [Undo]

You might want to temporarily hide a slide – for example, if you are giving the
presentation to a different group of people for whom that slide is not appropriate. You
could also have extra hidden slides which you could add in if you had plenty of time or if
someone asked a particular question during the show. When a slide is hidden it remains
within the PowerPoint file, but is not displayed during the presentation. To hide a slide:
4. Right click on the slide to be hidden (in Normal View you have to right click on
the slide miniature)
5. From the shortcut menu choose Hide Slide - you’ll find that the number
underneath the slide now has a line through it indicating that it’s hidden
6. To show the slide again, just repeat steps 4 and 5

Tip: To display a hidden slide when running a show, press the <h> key on the keyboard
or type in the slide number and press <Enter>.

Activity 19:
Instead of simply moving abruptly from one slide to another during a presentation, slide
transitions allow slides to dissolve into each other, using a variety of different special
effects. These can make your on-screen presentation look even better and more
professional. Use different effects in your presentation.

Solution:
1. Check you are in Normal view and that the first slide is selected
2. Move to the TRANSITIONS tab to see the following ribbon:

Dominating the ribbon is the Transition to This Slide group. As you click on an
icon, you’ll see the transition effect on the slide (there is also a down arrow that
will show you all the different transition effects in one window). The [Effect
Options] button lets you change the direction of the effect. Timing (the group to
the right) lets you change the speed of the transition effects.

3. Choose one of the transition effects for the first slide (the [down] arrow shows
all the effects).Note that a small star symbol appears to the left of the first slide

CSC101 –Lab Manual 41


miniature - this indicates that a transition has been setup on this slide. Explore
the options.
4. Click on [Effect Options] and change the direction of the effect
5. Increase the Duration of the transition to slow it down and see the effect more
clearly.
6. You can also set up a Sound: but note that the speakers might have been disabled
on the Lab PCs.
7. Another useful feature moves on a slide automatically (without you having to
click the mouse button):Under Advance Slide, set the next slide to appear After:
a set number of seconds
8. Move to the next slide and repeat steps 3 to 7, choosing different effects
9. Finally save your presentation (press <Ctrl+s>) then run it (<F5>) to see the
effects - press <Esc> when you've seen enough
Having different transition effects between slides may add interest but it isn’t good
practice. It distracts from the talk and isn’t good for accessibility. It’s best to stick to one
transition throughout (and only use a different one for effect, if you need to). To
standardize the transition:
10. Remove the current effects by choosing [None] (the first in the list) then click on
[Apply to All]
11. Next, choose your preferred transition (repeat steps 3 to 7) then click on [Apply
to All]
12. Finally, press <F5> to see the effects

Activity 20:
PowerPoint allows information on your slides to appear one item at a time. This stops
your audience from reading ahead of you, making them concentrate on each point
individually. Try to animate a set of bullet points.

Solution:
1. Move to the ANIMATIONS tab then click on a slide with a bulleted list on it (e.g.
slide 2)

2. Click on the bullet points then move the mouse over the Animations icons and
watch the effects
3. Click on the [down arrow] at the foot of the Animations scroll bar to see more
animations. Try setting up various animations for your slides.

CSC101 –Lab Manual 42


4. From the list of animations choose one of them, e.g.Fade
5. Click on [Effect Options] (if active) and see what is available
6. Repeat steps 3 to 5 for another slide with bullet points, choosing a different
animation
Tip: As with slide transition, it isn't a good idea to use too many different animations as
they can distract the viewer. Always bear accessibility in mind and avoid some of the
more 'exciting' animations.

To see what you can do with advanced animation:

7. Click on the slide title on one of the slides that you’ve already animated
8. Next, click on the [Animation Pane] button in the Advanced Animation group
to display the task pane

9. Click on the [Add Animation] button and choose an Entrance animation


10. Click the <▲> button (or on [Move Earlier] in the Timing group) to animate it
before the list
11. Select the title again and this time [Add Animation] choosing an Emphasis
animation
12. Repeat step 10 to move it to second in the list
13. Click the [Play From] or [Preview] button to view your changes
14. Next, try animating the picture, displaying it after the title animations
15. Finally, save your presentation (press <Ctrl+s>) then run it from the first slide
(press <F5>)

Tip: You can also set up Exit effects and MotionPaths - for example, when the slide is
finished, you can get the picture to exit along a particular motion path. This is all done
via the [Add Animation] button (as above).

CSC101 –Lab Manual 43


16. End by closing the Animation Pane (click on the button or on the [x] at its top
right)

Activity 21:
Create a Master slide. Master slides are very important as they control the layout of your
whole presentation. They allow you to create your own slide template which is applied
to every slide. This is useful if you want to put your own logo, picture or even just your
name in the same place on each slide.

Solution:
1. Move to the VIEW tab then click on the [Slide Master] icon in the MasterViews
group – a window similar to that below appears:

2. A Slide Master tab is displayed on the Ribbon indicating that you are in the Slide
Master view. Click on the first (top) slide miniature on the left
This is the Slide Master which is used by all the slides – any changes you make here are
applied to the whole presentation. The slide miniatures below are all the usual slide
layouts that are available, some of which are being used by certain slides. To make
changes just to a specific layout, you make them on that custom layout.

To change the look of all the information at the top/bottom of each slide:

3. Select the footer placeholders using the mouse to draw a selection rectangle over
the placeholders – hold down the mouse button and drag over them (the rectangle
must enclose the placeholders)
4. Move to the HOME tab and use buttons in the Font group to change the format,
e.g.font size
5. To change any placeholder's position, click on the edge (or, more easily, click on it
then press <Esc>) and use the <arrow_keys> to move it to its new position
6. To see the changes to all the slides, move to the SLIDE MASTER tab and [Close
Master View]
7. Save your presentation - press <Ctrl+s>
CSC101 –Lab Manual 44
3) Stage v (verify)
Home Activities:
Activity 1:
Create the PowerPoint folder in your flash drive. Run MS PowerPoint. Search and select
the template named Serenity Nature.
• Type “Introduction to ICT”, as the title of the slides. Type your name as the subtitle. Press
Enter. Type your course code, registration number and section in the line below your
name.
• Create a new slide. Its layout should be Tile and Text. In the title section, type CSC 101 –
registration number.Type Introduction to ICT in the “Click to Add Text” section (below
the slide’s title). It is going to be the first bulleted item.Type your Full Name as the second
bulleted item. Type Fall 2016 as the third bulleted item.
• Create a new slide. Use the same layout that you used previously.Switch to Outline View,
by clicking the Outline tab.Type BASIC COMPUTER CONCEPTS, next to the icon that
represents slide 3 and pressENTER.Click the Increase Indent button or press Tab and
then type, “What is a Computer?” (without the quotes) as the first bulleted item.Type the
following: “It is a device that accepts input, processes data, stores data, and produces
output.” (without the quotes) as the second bullet item.In the third bullet, type your full
name.
• For the second slide, type in the Notes pane “This definition is based on the concepts
presented in Dr. John von Neumann’s paper.”
• Spell-check your slides.
• Save your work in your flash disk as a PowerPoint Presentation named
FirstPresentation.pptx (you do not need to type .pptx). Save it inside your PowerPoint
folder.

Activity 2:
Create slides similar to the following set of slides. Use SmartArt, Chart and Shapes in the
Insert tab.

CSC101 –Lab Manual 45


Activity 3:
Animate the slides created in Activity 2 using different advanced animation effects and
motion paths.

Activity 4:
Create a Master Slide by using a custom layout:

• Adding a picture or image


• To change the background color, see Changing the Theme below The default font
and font sizes for the text and title styles

CSC101 –Lab Manual 46


4) Stage a2 (assess)
Assignment:
Deadline: at the start of next Lab.

Make a 15-minute presentation on different Input/Output devices (Chapters


2 and 3 of textbook). Use different effects, animations, transitions and a
custom Master Slide.

Note: this should be a formal presentation. Take care of font size, font color,
font names, and other styles and animations accordingly.

CSC101 –Lab Manual 47


CSC101 –Lab Manual 48
LAB # 04

Statement Purpose:
This lab is an introductory session on Python.It is a clear and powerful object-oriented
programming language, comparable to Perl, Ruby, Scheme and Java. Some of Python’s
notable features are:

• Easy to use that makes it simple to get your first programs working
• Easy to learn that makes it an excellent choice for beginners
• Runs everywhere, including Mac OS X, Windows, Linux and Unix

Activity Outcomes:
The lab will teach students to:

• Install Python
• Explore Python interpreter and IDLE
• Get familiar with outputting data to the screen
• Writing a basic ‘Hello World’ program

Instructor Note:
As a pre-lab activity, read Chapters12 from the book (Introduction to Computers by Peter
Norton, 6th edition (2013), McGraw Hill) to gain an insight about programming and its
fundamentals.

CSC101 –Lab Manual 49


Please sit in the back if you are inexperienced with Excel—Heather will be there to help

Worksheets:
• Excel’s main screen is called a “worksheet”.

• Each worksheet is comprised of many boxes, called “cells”.

CSC101 –Lab Manual 50


LAB # 03

Statement Purpose:
This lab is an introductory session on Python.It is a clear and powerful object-oriented
programming language, comparable to Perl, Ruby, Scheme and Java. Some of Python’s
notable features are:

• Easy to use that makes it simple to get your first programs working
• Easy to learn that makes it an excellent choice for beginners
• Runs everywhere, including Mac OS X, Windows, Linux and Unix

Activity Outcomes:
The lab will teach students to:

• Install Python
• Explore Python interpreter and IDLE
• Get familiar with outputting data to the screen
• Writing a basic ‘Hello World’ program

Instructor Note:
As a pre-lab activity, read Chapters12 from the book (Introduction to Computers by Peter
Norton, 6th edition (2013), McGraw Hill) to gain an insight about programming and its
fundamentals.

CSC101 –Lab Manual 51


5) StageJ(Journey)

Introduction
Programming is simply the act of entering instructions for the computer to perform.
These instructions might crunch some numbers, modify text, look up information in files,
or communicate with other computers over the Internet.All programs use basic
instructions as building blocks. Here are a few of the most common ones, in English:

• “Do this; then do that.”


• “If this condition is true, perform this action; otherwise, do that action.”
• “Do this action that number of times.”
• “Keep doing that until this condition is true.”

You can combine these building blocks to implement more intricate decisions,
too.Programming is a creative task, somewhat like constructing a castle out of LEGO
bricks. You start with a basic idea of what you want your castle to look like and inventory
your available blocks. Then you start building. Once you’ve finished building your
program, you can pretty up your code just like you would your castle.

Python refers to the Python programming language (with syntax rules for writing what
is considered valid Python code) and the Python interpreter software that reads source
code (written in the Python language) and performs its instructions.The name Python
comes from the surreal British comedy group Monty Python, not from the snake. Python
programmers are affectionately called Pythonistas.

6) Stage a1 (apply)
Lab Activities:
Activity 1:
Install Python on Windows.

Solution:
1. Visit https://www.python.org/downloads/ and download the latest version.
2. Run the downloaded software. Make sure you check option: Add Python 3.5 to
PATH.
3. To change install location, click on Customizeinstallation, then Next and enter
C:\python3.5 as install location or any other location you want.
4. If not checked, check Add Python to environment variables. This does the same
thing as Add Python 3.5 to PATH on the first install screen.
5. You can choose to install Launcher for all users or not, it does not matter much.
Launcher is used to switch between different versions of Python installed.

CSC101 –Lab Manual 52


Activity 2:
Set the PATH variable to use Python from Windows Command line i.e. DOS prompt.

Solution:
1. For Windows 2000, XP, 2003 , click onControl Panel -> System -> Advanced ->
Environment Variables
2. Click on the variable named PATH in the System Variables section, then select
Edit and add ;C:\Python3.5) to the end of what is already there. Of course, use the
appropriate directory name.
3. For older versions of Windows, open the file C:\AUTOEXEC.BAT and add the line
PATH=%PATH%;C:\Python3.5 and restart the system. For Windows NT, use the
AUTOEXEC.NT file.
4. For Windows Vista:

• Click Start and choose Control Panel


• Click System, on the right you'll see "View basic information about
your computer"
• On the left is a list of tasks, the last of which is Advanced system
settings. Click that.
• The Advanced tab of the System Properties dialog box is shown. Click
the Environment Variables button on the bottom right.
• In the lower box titled System Variables scroll down to Path and click
the Edit button.
• Change your path.
• Restart your system.

5. For Windows 7 and 8:

• Right click on Computer from your desktop and select Properties or


click Start and choose Control Panel -> System and Security ->
System. Click on Advanced system settings on the left and then click
on the Advanced tab. At the bottom click on EnvironmentVariables
and under Systemvariables, look for the PATH variable, select and
then press Edit.
• Go to the end of the line under Variable value and append
;C:\Python3.5 (please verify that this folder exists, it will be different
for newer versions of Python) to the end of what is already there. Of
course, use the appropriate folder name.
• If the value was %SystemRoot%\system32; It will now become
%SystemRoot%\system32;C:\Python3.5
• Click OK and you are done. No restart is required, however you may
have to close and reopen the command line.

CSC101 –Lab Manual 53


Activity 3:
Run Python prompt on Windows.

Solution:
1. For Windows users, you can run the interpreter in the command line if you have
set the PATH variable appropriately.
2. To open the terminal in Windows, click the start button and click Run. In the
dialog box, type cmd and press [enter] key.
3. Then, type pythonor py and ensure there are no errors.

Activity 4:
Run Python IDLE on Windows.

Solution:
IDLE (Integrated DeveLopment Environment or Integrated Development and Learning
Environment) is an integrated development environment for Python, which has been
bundled with the default implementation of the language.IDLE is intended to be a simple
IDE and suitable for beginners, especially in an educational environment.According to
the included README, its main features are:

• Multi-window text editor with syntax highlighting, autocompletion, smart indent


and other.
• Python shell with syntax highlighting.
• Integrated debugger with stepping, persistent breakpoints, and call stack
visibility.

1. Click on Start.
2. Search for Python IDLE.
3. Select it.

CSC101 –Lab Manual 54


Activity 5:
Run and use the interpreter prompt.

Solution:
1. Open the terminal in your operating system, as done in Activity 3.
2. Open the Python prompt by typing py and pressing [enter] key.
3. Once you have started Python, you should see >>> where you can start typing
stuff. This is called the Python interpreter prompt.
4. At the Python interpreter prompt, type:print("Hello World")followed by the
[enter] key.You should see the words Hello World printed to the screen.

5. Notice that Python gives you the output of the line immediately! What you just
entered is a single Python statement.We use print to print any value that you
supply to it. Here, we are supplying the text Hello World and this is promptly
printed to the screen.

CSC101 –Lab Manual 55


Activity 6:
Quit interpreter prompt.

Solution:
11. If you are using a GNU/Linux or OS X shell, you can exit the interpreter prompt by
pressing [ctrl + d] or entering exit() (note: remember to include the parentheses,
()) followed by the [enter] key.
12. If you are using the Windows command prompt, press [ctrl + z] followed by the
[enter] key.

Activity 7:
Add comment to a python statement.

Solution:
Comments are any text to the right of the #symbol and are mainly useful as notes for the
reader of the program.

1. Open Python IDLE.


2. Type print('hello world') # Note that print is a function. Press Enter.

OR

3. Comments are not executed i.e. output of the statement would still be hello world.

Activity 8:
Run Python scripts from command line. Use any text editor to write the script.

Solution:
1. Type the text below into a text editor and save as hello.py. Python files usually
have the .py extension.
#!/usr/bin/env python3
print('hello world')

2. If you are using Windows and Notepad++, it may look something like this:
CSC101 –Lab Manual 56
You can use any text editor to create a Python program.

3. To start the program, open the command line and typepy hello.py
4. You should see a line of text showing “hello world”

Activity 9:
Write a Python program that uses multi-line comment.

Solution:
1. Single line comments start with #; while multi-line comments use three single-
quotes before and after the part you want to be commented.
2. Type the following piece of code in text editor and save it with the name
multicomment.py
#!/usr/bin/env python3
#print(“I am a single line comment”)
print(“I am not a comment”)
‘’’
print(“we are in a multiline comment)
print(“we are still in a comment”)
‘’’
print(“we are out of the comment”)

3. Execute this script on command line. The result will not show single and multi-
line commented statements/lines.

Activity 10:

CSC101 –Lab Manual 57


Use \ to write single Python statement in multiple lines. Try this on Python IDLE.

Solution:
1. Run Python IDLE and type in print(“hello world”). Press Enter. The output hello
world will be displayed on screen.
2. print(“hello world”) is a single statement of Python. To write single statement in
multiple lines (for example, if a single line gets too long and it should be written
in multiple lines for ease of understanding), backslash \ is used.
3. Type print(“hello \ and press Enter. Now the cursor is in next line. Type world”)
and press Enter.

Activity 11:
Repeat Activity 10 by writing code in a separate file, using Python IDLE.

Solution:
1. Run Python IDLE.
2. Go to File->New File. A new window will be displayed.
3. Type in the code as shown below.

4. Go to File->Save As and save the file with the name tryFile.py


5. Go to Run->Run Module. The output will be displayed on the Python Shell.

Activity 12:

CSC101 –Lab Manual 58


Write multiple statements in a single line.

Solution:
1. Run Python IDLE or write python script and run it on command line.
2. Type in the following code.

print(“hello”); print(“world”)

3. Execute the code. You will see following output:

4. In python, semicolon (;) is used to separate two statements, written in a single


line.

7) Stage v (verify)
Home Activities:
Activity 1:
Install Python on your laptop/desktop. Run IDLE and change the font size of the editor
window.

Activity 2:
Run Python IDLE and print following data on screen:

a. Your full name


b. Your date of birth
c. Your registration number

Activity 3:
Make a Python program that prints out your information (Activity 2) by running python
script in a command line.

Activity 4:
Type in following pieces of code and examine the output.
CSC101 –Lab Manual 59
1. print hello
2. print “hello world”
3. print ‘hello’
4. print(“hello world”)
5. print(‘hello world’)
6. print(“hello”) \
print(“world”)
7. print(“The name of this course is \
Introduction to ICT”)
8. # I am a comment
I am not a comment
9. print(“hello”) print(“world”)

8) Stage a2 (assess)
Assignment:
Deadline: at the start of next Lab.

1. Make a Python program that displays the lyrics of a song. Save it with
the name mySong.py. Use single and multi-line comments to elaborate
meanings of lines and stanzas.

Execute the code, both on command line and IDLE. Save the
screenshots of the output.

2. Write down the output of each piece of code of Home Activity 4. Give
the reason of getting an error output (if any).

CSC101 –Lab Manual 60


LAB # 04

Statement Purpose:
In computer science and computer programming, a data type or simply type is a
classification identifying one of various types of data, such as integer, float or Boolean, that
determines the possible values for that type, the operations that can be done on values of
that type, the meaning of the data, and the way values of that type can be stored.
In computer programming, a variable or scalar is a storage location paired with an
associated symbolic name (an identifier), which contains some known or unknown quantity
of information referred to as a value.The variable name is the usual way to reference the
stored value; this separation of name and content allows the name to be used independently
of the exact information it represents.The identifier in computer source code can be bound
to a value during run time, and the value of the variable may thus change during the course
of program execution.
Python has two basic data types: Numbers and Strings. Number data types store numeric
values. Python supports four different numerical types: integers, long, float, and
complex.Strings in Python are identified as a contiguous set of characters represented in the
quotation marks. Python allows for either pairs of single or double quotes.

Activity Outcomes:
The lab will introduce students to:

• Python Numbers
• Python Strings
• Basic operations on numbers
• Basic operations on strings

Instructor Note:
As a pre-lab activity, read Chapters12 from the book (Introduction to Computers by Peter
Norton, 6th edition (2013), McGraw Hill) to gain an insight about programming and its
fundamentals.

CSC101 –Lab Manual 61


9) StageJ(Journey)

Introduction
Literal constants are values that are used as such. Their values do not change. An example
of a literal constant is a number, like 5, 1.23, or a string such as ‘This is a string’ or “It’s a
string!” The number 2 always represents itself and nothing else. It is a constant because
its value cannot be changed from 2. Numbers are mainly of two types – integers and floats.
An example of an integer is 2 which is just a whole number. Examples of floating point
numbers (or floats) are 3.23, 52.3E-4. A string is a sequence of characters. They are bunch
of words.

Variables are nothing but reserved memory locations to store values. This means that
when you create a variable you reserve some space in memory. Based on the data type of
a variable, the interpreter allocates memory and decides what can be stored in the
reserved memory. Therefore, by assigning different data types to variables, you can store
integers, decimals or characters in these variables.

Python supports different type of variables such as whole numbers, floating point
numbers and text. You do not need to specify the type of variable; you can simply assign
any value to a variable.

10) Stage a1 (apply)


Lab Activities:
Activity 1:
Display numbers on screen using Python IDLE.

Solution:
1. Run Python IDLE
2. Type in any number, say 24 and press Enter.
3. 24 should be printed on the screen
4. Now type 4.2, press Enter.
5. 4.2 should be displayed on screen as an output.
6. Now type print(234). Press Enter. 234 will be the output.
7. Type print(45.90) and press Enter. The output will show 45.90 on screen.

CSC101 –Lab Manual 62


Activity 2:
Display strings on screen.

Solution:
1. Python recognized strings through quotes (single, double). Anything inside quotes
is a string for Python interpreter.
2. Type hello, press Enter. An error message will be displayed as Python interpreter
does not understand this as a string.
3. Type ‘hello’ and press Enter. Hello will be displayed.
4. Type ‘Quote me on this!’ and press Enter. Same string will be displayed.
5. Type “What’s your name?” and press Enter. What’s your name? will be printed
on the screen.
6. You can specify multi-line strings using triple quotes – “ “ “ or ‘ ‘ ‘. Type following
text and press Enter
'''This is a multi-line string. This is the first line.
This is the second line.
"What's your name?," I asked.
He said "Bond, James Bond."
'''

Activity 3:
Use Python as a calculator.

Solution:
1. The interpreter acts as a simple calculator: you can type an expression at it and it
will write the value. Expression syntax is straightforward: the operators +
(addition), - (subtraction), * (multiplication) and / (division) work just like in
most other languages.Parentheses (()) can be used for grouping.
2. Type in 2 + 2 and press Enter. Python will output its result i.e. 4.
3. Try following expressions in the shell.
a. 50 – 4
b. 23.5 – 2.0
c. 23 – 18.5
d. 5 * 6
e. 2.5 * 10
f. 2.5 * 2.5
g. 28 / 4 (note: division returns a floating point number)
h. 26 / 4
i. 23.4 / 3.1
CSC101 –Lab Manual 63
Activity 4:
Get an integer answer from division operation. Also get remainder of a division operation
in the output.

Solution:
1. Division (/) always gives a float answer. There are different ways to get a whole
as an answer.
2. Use // operator:
a. Type 28 // 4 and press Enter. The answer is a whole number.
b. Type 26 // 4 and press Enter.
3. Use (int) cast operator: this operator changes the interchangeable types.
a. Type (int)26 / 4 and press Enter. The answer is a whole number.
b. Type (int) 28/4; press Enter.
4. The modulus (or mod) % operator is used to get the remainder as an output
(division / operator returns the quotient).
a. Type 28 % 4. Press Enter. 0 will be the result.
b. Type 26 % 4. Press Enter. 2 will be the result.

Activity 5:
Calculate 43, 410, 429, 4150, 41000

Solution:
1. The multiplication (*) operator can be used for calculating powers of a number.
However, if the power is big, the task will be tedious. For calculating powers of a
number, Python uses ** operator.
2. Type following and obtain the results of above expressions.
a. 4 ** 3
b. 4 ** 10
c. 4 ** 29
d. 4 ** 150
e. 4 ** 1000

Activity 6:
Write following math expressions. Solve them by hand using operators’ precedence.
Calculate their answers using Python. Match the results.

CSC101 –Lab Manual 64


Solution:
The table below shows the operator precedence in Python (from Highest to Lowest).
Operator Operation Example
** Exponent 2 ** 3 = 8
% Modulus/remainder 22 % 8 = 6
// Integer division/floored quotient 22//8 = 2
/ Division 22/8 = 2.75
* Multiplication 3*5 = 15
- Subtraction 5–2=3
+ Addition 2+2=4

Calculate following expressions:

1. 2+3*6
2. (2+3)*6
3. 48565878 * 578453
4. 2 + 2 (note the spaces after +)
5. (5 - 1) * ((7 + 1) / (3 - 1))
6. 5 +
7. 42 + 5 + * 2

Activity 7:
Concatenate two or more strings. Also replicate a string.

Solution:
The meaning of an operator may change based on the data types of the values next to it.
For example, + is the addition operator when it operates on two integers or floating-point
values. However, when + is used on two string values, it joins the strings as the string
concatenation operator.
1. Enter the following into the interactive shell:'Alice' + 'Bob'. The result will be
'AliceBob'

The expression evaluates down to a single, new string value that combines the text of the
two strings. However, if you try to use the + operator on a string and an integer value,
Python will not know how to handle this, and it will display an error message.

2. Type 'Alice' + 42 and press Enter. Following error will be displayed.


Traceback (most recent call last):
File "<pyshell#26>", line 1, in <module>
'Alice' + 42
TypeError: Can't convert 'int' object to str implicitly

CSC101 –Lab Manual 65


The * operator is used for multiplication when it operates on two integer or floating-point
values. But when the * operator is used on one string value and one integer value, it
becomes the string replication operator. Enter a string multiplied by a number into the
interactive shell to see this in action.

3. Type 'Alice' * 5 and press Enter. The output will be 'AliceAliceAliceAliceAlice'

The expression evaluates down to a single string value that repeats the original a number
of times equal to the integer value. String replication is a useful trick, but it’s not used as
often as string concatenation.

The * operator can be used with only two numeric values (for multiplication) or one
string value and one integer value (for string replication). Otherwise, Python will just
display an error message.

4. Type 'Alice' * 'Bob'; press Enter. Following error will occur.


Traceback (most recent call last):
File "<pyshell#32>", line 1, in <module>
'Alice' * 'Bob'
TypeError: can't multiply sequence by non-int of type 'str'

5. Type 'Alice' * 5.0; press Enter. Following error will occur.


Traceback (most recent call last):
File "<pyshell#33>", line 1, in <module>
'Alice' * 5.0
TypeError: can't multiply sequence by non-int of type 'float'

Activity 8:
Use python variables to store values.

Solution:
You’ll store values in variables with an assignment statement. An assignment statement
consists of a variable name, an equal sign (called the assignment operator), and the value
to be stored. If you enter the assignment statement spam = 42, then a variable named
spam will have the integer value 42 stored in it.

Enter the following into the interactive shell.


1. >>>spam = 40
>>>spam
2. >>>eggs = 2
>>> spam + eggs
3. >>> spam + eggs + spam
4. >>> spam = spam + 2
>>> spam

A variable is initialized (or created) the first time a value is stored in it ❶. After that, you
can use it in expressions with other variables and values ❷. When a variable is assigned
a new value ③, the old value is forgotten, which is why spam evaluated to 42 instead of
CSC101 –Lab Manual 66
40 at the end of the example. This is called overwriting the variable. Enter the following
code into the interactive shell to try overwriting a string:
5. >>> spam = 'Hello'
>>> spam
6. >>>spam = ‘Goodbye’
>>>spam

Python allows you to assign a single value to several variables simultaneously.


7. >>> a = b = c = 100
>>>a
>>>b
>>>c
>>>print(a,b,c)
8. >>>a, b, c = 1, 2, “John”
>>>print(a,b,c)

Activity 9:
Try different variable names and check the output.

Solution:
You can name a variable anything as long as it obeys the following three rules:

o It can be only one word.


o It can use only letters, numbers, and the underscore (_) character.
o It can’t begin with a number.

Try following statements in Python:

1. Balance = 3.0
2. Current-balance = 4
3. currentBalance = 1
4. current_balance = 28/2
5. current balance = 128
6. 4account = ‘Ali’
7. _spam = ‘Ali’
8. 42 = ‘amount’
9. SPAM = ‘amount’
10. Total_$um = 2345
11. Account4 = ‘Ali’
12. ‘hello’ = ‘world’

CSC101 –Lab Manual 67


Variable names are case-sensitive, meaning that spam, SPAM, Spam, and sPaM are four
different variables. It is a Python convention to start your variables with a lowercase
letter.

Activity 10:
Write a Python program that uses assignment operators and comments.

Solution:
Type the code given below either in IDLE or as script. Execute it.

#!/usr/bin/python

counter =100# An integer assignment


miles =1000.0# A floating point
name ="John"# A string

print counter
print miles
print name

Activity 11:
Combine numbers and text.

Solution:
Type the following code. Run it.

# Text
x = "Nancy"
print(x)

# Combine numbers and text


s = "My lucky number is %d, what is yours?" % 7
print(s)

# alternative method of combining numbers and text


s = "My lucky number is " + str(7) + ", what is yours?"
print(s)

Activity 12:
Take input from the keyboard and use it in your program.

CSC101 –Lab Manual 68


Solution:
In Python and many other programming languages you can get user input. In Python the
input() function will ask keyboard input from the user.The input function prompts text if
a parameter is given. The function reads input from the keyboard, converts it to a string
and removes the newline (Enter).Type and experiment with the script below.

#!/usr/bin/env python3

name = input('What is your name? ')


print('Hello ' + name)

job = input('What is your job? ')


print('Your job is ' + job)

num = input('Give me a number? ')


print('You said: ' + str(num))

11) Stage v (verify)


Home Activities:
Activity 1:
Try the following expressions in Python.
1. -28 + 56
2. -28 + -56
3. 5 / -2
4. -93 % 4
5. (-93)%4
6. -4 ** 10
7. (-4)**10
8. (-4)**9

Activity 2:
Write more complex math expressions. Solve them by hand using operators’ precedence.
Calculate their answers using Python. Match the results.

CSC101 –Lab Manual 69


Activity 3:
Do the following:

>>>width =20
>>>height =5*9
>>>width * height
>>> n
>>>tax =12.5/100
>>>price =100.50
>>>price * tax
>>>price + _
Note: the last printed expression is assigned to variable _.
>>> round(_,2)

Activity 4:
Do the following on strings:

>>>'spam eggs'# single quotes


>>>'doesn\'t'# use \' to escape the single quote...
>>>"doesn't"# ...or use double quotes instead
>>>'"Yes," he said.'
>>>"\"Yes,\" he said."
>>>'"Isn\'t," she said.'
>>>'"Isn\'t," she said.'
>>>print('"Isn\'t," she said.')
>>>s ='First line.\nSecond line.'# \n means newline
>>>s # without print(), \n is included in the output
>>>print(s) # with print(), \n produces a new line
>>>print('C:\some\name') # here \n means newline!
>>>print(r'C:\some\name') # note the r before the quote
>>>print("""\
Usage: thingy [OPTIONS]
-h Display this usage message
-H hostname Hostname to connect to
""")
>>># 3 times 'un', followed by 'ium'
>>>3*'un'+'ium'
>>>'Py''thon'
>>>prefix ='Py'
>>>prefix 'thon'# can't concatenate a variable and a string
literal
>>>('un'*3) 'ium'
>>>prefix +'thon'
>>>text = ('Put several strings within parentheses '
... 'to have them joined together.')

CSC101 –Lab Manual 70


Activity 5:
Type the program below and start it.
#!/usr/bin/python

x = 3 # a whole number
f = 3.1415926 # a floating point number
name = "Python" # a string

print(x)
print(f)
print(name)

combination = name + " " + name


print(combination)

sum = f + f
print(sum)

12) Stage a2 (assess)


Assignment:
Deadline: at the start of next Lab.

3. Make a program that


• Displays several numbers.
• Solves and shows the summation of 64 + 32.
• Does the same as in 2, but make it sum=x+y
• Prints the word ‘Lucky’ inside s.
• Prints the day, month, year in the format “Today is
2/2/2016”
• Asks user his/her phone number and displays it like: “Your
phone number is: XXXXXXXXX”; where XXXXXXXXX is the
phone number.

CSC101 –Lab Manual 71


LAB # 05

Statement Purpose:
This lab will give you practical implementation of different types of Conditional Statements (if-
else).

Activity Outcomes:
This lab teaches you the following topics:

• Use of indentation
• Use of simple if statement
• Use of if-else statement
• Use of nested-if statement

Instructor Note:
As pre-lab activity, read Chapter 12 from the book (Learning Python, Mark Lutz, 5th Edition (2013),
O'Reilly Media), and also as given by your theory instructor.

CSC101 –Lab Manual 72


13) Stage J (Journey)

Introduction:
‘if’ statement is used to perform logical operation. In order to perform decision making, we need
to check certain condition(s) before processing. Python supports if statement for doing so. There
are various formats of if statement including if-else and if-elif.

The basic and shortest form of if statement is as below:

if condition:
statement1
statement2

If the condition is true then the specified block will be executed. It is important to note that the
block is specified by the use of indentation. Python does not use a pair of curly bracket { } to
specify the block.

We can also write the else block associated with the if statement as below.

if condition:
statement1
statement2


else:
statement3
statement4

If we are required to test a number of conditions and want to execute one of the many blocks of
statements, then we can use if-elif-else statement as below.

if condition1
statement1
statement2


elif condition2:
Statement3
Statement4


elif condition3:
Statement5
Statement6


else:
Statement7
Statement8
CSC101 –Lab Manual 73
14) Stage a1 (apply)
Lab Activities:
Activity 1:
Let us take an integer from user as input and check whether the given value is even or
not.

Solution:
A. Create a new Python file from Python Shell and type the following code.
B. Run the code by pressing F5.

You will get the following output.

Activity 2:
Let us modify the code to take an integer from user as input and check whether the given
value is even or odd. If the given value is not even then it means that it will be odd. So
here we need to use if-else statement an demonstrated below.

Solution:
A. Create a new Python file from Python Shell and type the following code.
B. Run the code by pressing F5.

You will get the following output.

CSC101 –Lab Manual 74


Activity 3:
Let us accept two integer values from user and compare which one is the larger value. If
both are equal values then we should display that both are equal values. In this activity
you will use if-elif-else structure of if statement. This is used when we need to check
more than one conditions to perform certain action.

Solution:
A. Create a new Python file from Python Shell and type the following code.
B. Run the code by pressing F5.

You will get the following output.

Activity 4:
Let us modify the above code in order to apply nested if structure. Sometimes we need
to use an if statement within the block of another if to find the solution of the problem.
The following code example illustrates that how nested if can be used in Python.

Solution:
A. Create a new Python file from Python Shell and type the following code.
B. Run the code by pressing F5.

You will get the following output.

CSC101 –Lab Manual 75


15) Stage v (verify)
Home Activities:
Activity 1:
Write a Python code to accept marks of a student from 1-100 and display the grade
according to the following formula.

Grade F if marks are less than 50


Grade E if marks are between 50 to 60
Grade D if marks are between 61 to 70
Grade C if marks are between 71 to 80
Grade B if marks are between 81 to 90
Grade A if marks are between 91 to 100

Activity 2:
Write a Python code to accept temperature value from user (in centigrade) and display
an appropriate message as below.

FREEZING if temperature in less than 0


COLD if temperature is between 0 to 15
WARM if temperature is between 16 to 30
HOT if temperature is between 31 to 40
VERY HOT if temperature is greater than 40

16) Stage a2 (assess)


Assignment:
For this student will submit Lab Assignment before the deadline.

CSC101 –Lab Manual 76


LAB # 06

Statement Purpose:
This lab will give you practical implementation of different types of loops including for loop,
while loop and nested loops.

Activity Outcomes:
This lab teaches you the following topics:

• while loop
• for loop
• Use of break statement
• Nested loops

Instructor Note:
As pre-lab activity, read Chapter 13 from the book (Learning Python, Mark Lutz, 5th Edition
(2013), O'Reilly Media), and also as given by your theory instructor.

CSC101 –Lab Manual 77


17) Stage J (Journey)

Introduction:

Loops are one of the basic structures of a programming language. Loops are performed
to repeat a step or steps for a certain number of times. Python offers two looping
statements called while and for. Both have their own uses and advantages.

This lab session covers both of the loop structures.

while loop
The commonly used syntax of while loop is as below.

while condition:
statement1
statement2
statement3

The statements written after the while statements (indented block) are repeated as long
as the condition is true. The control will transfer to the statement written outside the
indented block when the condition becomes false. We can also break the continuation of
the loop by writing break statement within indented block as below.

while condition1:
statement1
statement2
if condition2:
break
statement3

In the above case, the while loop will be stopped if the result of condition2 is true.

While loop can also have an optional else part and is executed if break statement was
not executed. The syntax of while loop having else block is as below.

while condition:
statement1
statement2
statement3

else:
statement1
statement2
statement3

CSC101 –Lab Manual 78


for loop
for loop can be used in a number of ways. One of its syntax is as below.

for var in range(value1,value2,value3):


statement1
statement2
statement3

Where …

value1 refers to the initial value of the range. It will be considered 0 if not
mentioned.
Value2 refers to the final value of the range. It will be required to perform the loop.
Value3 refers to the step value. It will be added (incremented) every time the loop
is repeated. It will considered 1 if skipped.

for loop has an optional else part as well. It works exactly as in while loop. It is
executed only if break statement is not executed. The syntax becomes as below.

for var in range(value1,value2,value3):


statement1
statement2
statement3

else:
statement1
statement2
statement3

There is also use of for loop to be used with lists. It will be covered in the next lab session.

CSC101 –Lab Manual 79


18) Stage a1 (apply)
Lab Activities:
Activity 1:
Calculate the sum of all the values between 0-10 using for loop.

Solution:
C. Create a new Python file from Python Shell and type the following code.
D. Run the code by pressing F5.

You will get the following output.

Activity 2:
Repeat the above code using while loop.

Solution:
C. Create a new Python file from Python Shell and type the following code.
D. Run the code by pressing F5.

You will get the following output.

CSC101 –Lab Manual 80


Activity 3:
Accept 5 integer values from user and display their sum.

Solution:
C. Create a new Python file from Python Shell and type the following code.
D. Run the code by pressing F5.

You will get the following output.

Activity 4:
Write a Python code to keep accepting integer values from user until 0 is entered. Display
sum of the given values.

Solution:
C. Create a new Python file from Python Shell and type the following code.
D. Run the code by pressing F5.

You will get the following output.

CSC101 –Lab Manual 81


Activity 5:
Write a Python code to accept an integer value from user and check that whether the
given value is prime number or not.

Solution:
A. Create a new Python file from Python Shell and type the following code.
B. Run the code by pressing F5.

You will get the following output.

If we run the program again and enter 17 as input value then the output will be as
below.

CSC101 –Lab Manual 82


19) Stage v (verify)
Home Activities:
Activity 1:
Replace the for loop with while loop in the activity 5 discussed above.

Activity 2:
Write a Python code to display all the prime numbers between 100 to 200.

Activity 3:
Write a program that takes a number from user and calculate the factorial of that number.

Activity 4:
Fibonacci series is that when you add the previous two numbers the next number is
formed. You have to start from 0 and 1.
E.g. 0+1=1 → 1+1=2 → 1+2=3 → 2+3=5 → 3+5=8 → 5+8=13

So the series becomes


0 1 1 2 3 5 8 13 21 34 55 ……………………………………

Steps: You have to take an input number that shows how many terms to be displayed.
Then use loops for displaying the Fibonacci series up to that term e.g. input no is =6 the
output should be
011235

CSC101 –Lab Manual 83


20) Stage a2 (assess)
Assignment:
For this student will submit Lab Assignment before the deadline.

CSC101 –Lab Manual 84


LAB # 07

Statement Purpose:
This lab will give you practical implementation of different types of sequences including
Lists and Tuples. Lists are the most commonly used data structure in Python. Tuples are also
very useful and widely used by Python programmers.

Activity Outcomes:
This lab teaches you the following topics:

• How to use lists


• How to use tuples

Instructor Note:
As pre-lab activity, read Chapter 8 from the book (Learning Python, Mark Lutz, 5th Edition
(2013), O'Reilly Media), and also as given by your theory instructor.

CSC101 –Lab Manual 85


21) Stage J (Journey)

Introduction:

Python provides different types of data structures as sequences. In a sequence, there are
more than one values and each value has its own index. The first value will have an index
0, the second value will have index 1 and so on. These indices are used to access a
particular value in the sequence.

Python offers different types of sequences but we will discuss two of them, lists and
tuples.

Lists
Lists are the most important type of sequence being used in Python. It is a collection of
same or different type of objects. These objects are separated by commas to distinguish
from each other enclosed in square brackets. The following activities show that how lists
are used in Python.

Tuples
Tuples are almost same as Lists but the main difference them is that objects defined in
tuples cannot be changed while they can be changed in lists. A minor difference is that
lists are enclosed in square brackets while tuples are enclosed parenthesis (round
brackets). The following activities show that how tuples are used in Python.

CSC101 –Lab Manual 86


22) Stage a1 (apply)
Lab Activities:
Activity 1:
Accept 5 values from user and store them in a list. Display all the values (objects) of the
list.

Solution:
E. Create a new Python file from Python Shell and type the following code.
F. Run the code by pressing F5.

You will get the following output.

Activity 2:
Repeat the above code by accepting 5 integer values from user. Store these values in a list
and display the sum of given values.

Solution:
E. Create a new Python file from Python Shell and type the following code.
F. Run the code by pressing F5.

CSC101 –Lab Manual 87


You will get the following output.

Activity 3:
Accept 5 integer values from user. Store these values in a list and display the list in
ascending order.

Solution:
E. Create a new Python file from Python Shell and type the following code.
F. Run the code by pressing F5.

You will get the following output.

CSC101 –Lab Manual 88


Activity 4:
Accept two lists from user and display their join.

Solution:
E. Create a new Python file from Python Shell and type the following code.
F. Run the code by pressing F5.

You will get the following output.

Activity 5:
Write a Python code to accept a list from user and find a required element in it.

Solution:
C. Create a new Python file from Python Shell and type the following code.
D. Run the code by pressing F5.

CSC101 –Lab Manual 89


You will get the following output.

If we run the program again and enter 55 to find in the list then the output will be as
below.

Activity 6:
Write a Python code to accept a tuple from user and display the maximum and minimum
value of the tuple.

Solution:
A. Create a new Python file from Python Shell and type the following code.
B. Run the code by pressing F5.

CSC101 –Lab Manual 90


You will get the following output.

23) Stage v (verify)


Home Activities:
Activity 1:
Create two lists based on the user values. Merge both the lists and display in sorted order.

Activity 2:
Repeat the above activity to find the smallest and largest element of the list. (Suppose all
the elements are integer values)

Activity 3:
Repeat the above activity to find the index of the smallest and largest element of the list.
(Suppose all the elements are integer values)

Activity 4:
CSC101 –Lab Manual 91
Accept a list of 10 integer values from user and display the list in descending order.

24) Stage a2 (assess)


Assignment:
For this student will submit Lab Assignment before the deadline.

CSC101 –Lab Manual 92


LAB # 08

Statement Purpose:
This lab will give you practical implementation of different types of user-defined functions.

Activity Outcomes:
This lab teaches you the following topics:

• How to define own functions


• How to use user-defined functions
• Passing different types of arguments

Instructor Note:
As pre-lab activity, read Chapters 16,17,18 from the book (Learning Python, Mark Lutz, 5th
Edition (2013), O'Reilly Media), and also as given by your theory instructor.

CSC101 –Lab Manual 93


25) Stage J (Journey)

Introduction:

It is usually a better approach to divide a large code in small functions. A function is a


small piece of code used to perform a specific purpose. Functions are defined first then
called whenever needed. A program may have as many functions as required. Similarly a
function may be called as many times as required.

How to Define Functions


Functions are defined as below.

def function_name(list_of_parameters):
statement1
statement2
statement3

return value

The list of parameters is optional if a function is not accepting any value but is usually
required while defining a function. Similarly, return statement is optional but is required
if a function returns a value.

How to Call A Function

Once a function is defined then it can be called by using its name and providing values to
the parameters. Calling a function in Python is same as in other programming languages.

The following activities demonstrate that how functions are defined and called in Python.

CSC101 –Lab Manual 94


26) Stage a1 (apply)
Lab Activities:
Activity 1:
Define a function to accept an integer value and return its factorial.

Solution:
G. Create a new Python file from Python Shell and type the following code.
H. Run the code by pressing F5.

You will get the following output.

Activity 2:
Write a function to accept 2 integer values from user and return their sum.

Solution:
G. Create a new Python file from Python Shell and type the following code.
H. Run the code by pressing F5.

You will get the following output.

CSC101 –Lab Manual 95


Activity 3:
Define a function to accept an integer value from user and check that whether the given
value is prime number or not. If the given value is a prime number then it will return true
otherwise false.

Solution:
G. Create a new Python file from Python Shell and type the following code.
H. Run the code by pressing F5.

You will get the following output.

Activity 4:
Define a function to accept a list of integer values and return the sum of it.

Solution:
G. Create a new Python file from Python Shell and type the following code.
H. Run the code by pressing F5.

CSC101 –Lab Manual 96


You will get the following output.

Activity 5:
Write a Python code to accept a list of integers and sort it in descending order.

Solution:
E. Create a new Python file from Python Shell and type the following code.
F. Run the code by pressing F5.

You will get the following output.

CSC101 –Lab Manual 97


27) Stage v (verify)
Home Activities:
Activity 1:
Write a function to accept an integer ‘n’ and display ‘n’ elements of Fibonacci series.

Activity 2:
Write a function to accept two lists of integer values and return the largest value.

Activity 3:
Write a function to accept two integer values and swap them with each other.

28) Stage a2 (assess)


Assignment:
For this student will submit Lab Assignment before the deadline.

CSC101 –Lab Manual 98


LAB # 09

Statement Purpose:
This lab provides an overview of tables in Microsoft Access 2010, and introduces new or
removed table features. This lab also explains how to create a table, how to add fields to
a table, how to set a table's primary key, and how to set field and table properties.

Activity Outcomes:
• Create simple Access tables and forms
• Modify form design
• Create relationship between tables
• Create simple select and crosstab queries
• Extract information from tables or queries

Instructor Note:
• As pre-lab activity, read Chapter 8 from the book (Using Information Technology: A
Practical Introduction to Computer & Communications,Stacey, W.S & Sawyer, C., 10th
Edition (2012), McGraw Hill.)

CSC101 –Lab Manual 99


29) StageJ(Journey)

Introduction
Tables are essential objects in a database because they hold all of the relevant
data. For example, a database for a Medical Store can have a table that stores
the names of their suppliers, e-mails, addresses, telephone numbers, etc. This
lab provides an overview of tables in MS Access. Before you create tables,
consider your requirements and determine all the tables that you might need.

• A database file in Access has *.accdb extension.


• An Access desktop database (.accdb) is a fully functional RDBMS.
• It provides all the data definition, data manipulation, and data control
features that you need to manage large volumes of data.
• You can use an Access desktop database (.accdb) either as a standalone
Relational Database Management Systems (RDBMS) on a single
workstation or in a shared client/server mode across a network.
• A desktop database can also act as the data source for data displayed on
webpages on your company intranet.
• When you build an application with an Access desktop database, Access
is the RDBMS.

30) Stage a1 (apply)


Lab Activities:
Activity 1:
MS Access Sample Database

Solution:
1. Create a database from a template.

a. Click Options on File tab.


b. Set Default database folder under Creating databases to a desired
location & click the OK button.
c. On the New tab of Microsoft Office Backstage view, click Sample
Templates.
d. Under Available Templates, click the Students template.
e. Name your database lab1 in the File Name box on the right side of page,
and click Create.

CSC101 –Lab Manual 100


2. Create database objects.

a. Press F11 to open the Navigation Pane. Click the downward-pointing


triangle in a circle at the top of that pane. (Note: F11 doesn't work with
Access in the virtual machine. If the navigation pane isn't already open,
you can click the sideway arrows to open the pane.)
b. In the list that opens, click Object Type. There are the objects created for
you in this pre-built database.
c. On the Ribbon, click the Create tab.
d. In the Tables group, click Table.
e. In the rightmost column, click the down-arrow next to Click to Add.
f. Select the data type Text.
g. Access creates the new column and selects the field name.
h. Type the name Project Name for the field.
i. Add a Description column in a similar manner.
j. Right-click the Table 1 tab, click Save, and name the table Project.
k. Click the Create tab. In the Forms group, click Form.
l. Click the Create tab. In the Reports group, click Report.

Activity 2:
Manipulate data in the tables by adding and deleting different records.

31) Stage v (verify)


Home Activities:
Activity 1:
Group the filesinto a database.

32) Stage a2 (assess)


Assignment:
Make a databaseof your class consisting of as much files as number of students in the
class. Each file should contain three records: a student’s medical record, personal record
and academic record. All of the record should have the required filed.

CSC101 –Lab Manual 101


LAB # 10

Statement Purpose:
• It is arguably the most user-friendly version of Linux out there. Ubuntu's whole
philosophy is based around making is easier for the user - hiding any
unnecessary complexity behind the scenes
• It has a huge repository of (free) software available - by far the most of any Linux
distribution (distro).
• It has a huge installed base: it's the most popular distro, so there are plenty of
people and websites out there supporting it
• It's backed by Canonical, which means that they have the resources to put out
six-monthly releases plus bug-fixes

Activity Outcomes:
Bash is the language that you will learn to love as much of everyday Ubuntu life is done/can
be done using the Terminal. You will soon learn that most things can be done through both
GUI (Graphical User Interface) and CLI (Command Line Interface), however some things are
more easily achieved from one or the other. For example, changing file permissions of a
folder and all its sub folders is more easily achieved using CLI instead GUI.

Instructor Note:
As pre-lab activity, read Chapter 3 from the book (Linux unleashed third edition by Tim
Parker)

CSC101 –Lab Manual 102


1) StageJ(Journey)

Introduction
Ubuntu is an operating system that is developed by a worldwide community of
programmers as well as by employees of Ubuntu's commercial sponsor, Canonical.
Ubuntu is based on the concept of free or open-source software, meaning that you do not
pay any licensing fees for Ubuntu, and you can download, use, and share the operating
system free of charge.

Ubuntu is "free software" — a term which is often misunderstood to mean only free of
cost. While Ubuntu is free of cost, the term "free software" more accurately refers to the
freedom to run the program for any purpose, to study how the program works and modify
it to your needs, to redistribute copies, and to improve the program and release your
improvements to the public.

Being a Linux-based operating system, Ubuntu has a well-deserved reputation for


stability and security. Historically, Linux has proven itself to be a workhorse server
operating system, and this is where, up until now, it has been most widely used and best
known.

Security updates and bug fixes for applications and the operating system are managed by
Ubuntu, and users are notified about these updates through an icon in the taskbar, which
they can click on to install.

2) Stage a1 (apply)
Lab Activities:
Activity 1:
Install and configure Ubuntu

Activity 2:
There are many bash command to learn. The following is an abbreviated list of the most
useful ones. To access bash, click on the search icon (a stylized Ubuntu logo) at the top of
the launcher and then type ‘terminal’ in the search bar. You may wish to add the terminal
to the launcher since you will be using it a lot

CSC101 –Lab Manual 103


Solution:
apropos == find a command apropos of

apt-get == install and manage software

cd == change directory

chmod == change file mode

chown == change file ownership

cp == copy a file

file == determine file type

find == find a file’s location (by name)

gzip == compress or expand files

less == read a file one screen at a time

ls == list directory contents

make == build an application using a MakeFile

man == read the manual for a command

mkdir == make a directory

mv == move a file

pwd == print working directory

rm == remove a file

sftp == secure file transfer protocol (connect to another computer)

ssh == secure shell hyper–terminal (connect to another computer)

sudo == use a pseudonym when executing a command

tar == tape archiver (the tape drive is optional)

wget == web getter

CSC101 –Lab Manual 104


3) Stage v (verify)
Home Activities:
Activity 1:
1. Where is the bash program located on your system?

2. Use the --version option to find out which version you are running.

3. Which shell configuration files are read when you login to your system using the
graphical user interface and then opening a terminal window?

4. Are the following shells interactive shells? Are they login shells?

A shell opened by clicking on the background of your graphical desktop, selecting


"Terminal" or such from a menu.

4) A shell that you get after issuing the command ssh localhost.
5) A shell that you get when logging in to the console in text mode.
6) A shell obtained by the command xterm&.
7) A shell opened by the mysystem.sh script. A shell that you get on a remote host,
for which you didn't have to give the login and/or password because you use SSH
and maybe SSH keys.
8) Can you explain why bash does not exist when you type Ctrl+C on the command
line?
9) Display directory stack content.
10)If it is not yet the case, set your prompt so that it displays your location in the file
system hierarchy, for instance add this line to ~/.bashrc: export PS1="\u@\h \w>
"
11)Display hashed commands for your current shell session.
12)How many processes are currently running on your system? Use ps and wc, the
first line of output of ps is not a process!
13)How to display the system hostname? Only the name, nothing more!
14) Stage a2 (assess)
Assignment:
1. Write a script using your favorite editor. The script should display the
path to your homedirectory and the terminal type that you are using.
Additionally it shows all the services started up in runlevel 3 on your
system. (hint: use HOME, TERM and ls /etc/rc3.d/S*)
2. Add comments in your script.

CSC101 –Lab Manual 105


3. Add information for the users of your script.
4. Change permissions on your script so that you can run it.
5. Run the script in normal mode and in debug mode. It should run without
errors.
6. Make errors in your script: see what happens if you misspell commands, if
you leave out the first line or put something unintelligible there, or if you
misspell shell variable names or write them in lower case characters after
they have been declared in capitals. Check what the debug comments say
about this.

CSC101 –Lab Manual 106


LAB # 11

Statement Purpose:
In this lab you learn how to connect two/multiple PCs to create a Peer-to-Peer/simple
LAN or workgroup. You will share a folder on one workstation and share that folder
from the other workstation.

Activity Outcomes:
• Create a simple LAN with two PCs using a single crossover cable to connect the
workstations.
• Create a simple LAN with multiple PCs using an Ethernet switch and a straight-
through cable to connect each workstation.
• Map a logical Drive and use Universal Naming Convention (UNC) to share available
resources.
• Use the Control Panel / Network utility to verify and configure the network settings.
• Use the ICMP Ping command to verify the TCP/IP connection between the two
workstations.
• Use the IPCONFIG.EXE utility to verify some of the IP configuration settings

Instructor Note:

As pre-lab activity, read Chapter 7 from the book (Introduction to computers by Peter
Norton)

CSC101 –Lab Manual 107


1) StageJ(Journey)

Introduction
In this laboratory exercise, you will build an Ethernet LAN and connect your LAN to the
Internet. You will also configure your computer to obtain an IP address automatically
using Dynamic Host Configuration Protocol (DHCP). Once the stations obtain IP
addresses, they will be able to communicate with each other and the Internet. You will
use the Window’s ping and tracert utilities to test connectivity, and the arp program to
view the hosts ARP table.

2) Stage a1 (apply)
Lab Activities:
Activity 1:
Two PCs (or workstations) will be connected directly to each other from one Network
Interface card (NIC) to the other NIC using a crossover cable. This can be useful to allow
you to create a minilab for testing purposes without the need for a hub. Since the NICs on
the workstations are directly connected you will not be able to connect any additional
workstations.

Activity 2:
All PCs on the same row will be connected with a switch. Using a switch allows for more
than just two workstations to be connected. Switches can have anywhere from four to
twenty four ports.

Solution:
The following resources will be required:

✓ Two workstations with a NIC in each (Make sure that you boot up with the
Windows 8
✓ Exercise A - One CAT 5 Crossover cable to connect two workstations without
a hub.
✓ Exercise B - An Ethernet switch (12 or 24 port) and a CAT 5 straight through
cable for each work station.

CSC101 –Lab Manual 108


NOTE:

Steps 1 (physical LAN connections) will be different between exercises A and B. The
steps from 2 on should be the same.

Step 1 - Check Local Area Network (LAN) Connections

Verify that you are using the right type of cable.

Exercise A - A single CAT 5 crossover cable is used to connect two workstations


together. Refer to figure 1

Exercise B - Each work station will connect to the switch using a straight through cable.
Refer to figure 1

Cross
Over

Straight Through Cable. This cable will connect This crossover cable will connect
PC1's lowest-numbered NIC to the switch PC2's lowest-numbered NIC to
PC4's lowest-numbered NIC

(Figure 1)

Step 2 – Identifying NICs and Windows Networking Options

Go to Control Panel, Network and dialup connections. You should be able to see three
icons:

CSC101 –Lab Manual 109


1. Highest-Numbered NICwhich is used to connect your PC to the college
network. This NIC is enabled by default; however, you have to disable it before
you do any labs. Right-click on it and choose disable from the short cut menu.
Now you are disconnected from the college network (you can’t browse the web
and you can’t print)

2. The Lowest-Numbered NIC which is used to connect you to the Cisco lab. This
NIC is disabled by default and has to be enabled when you do the labs. Right-
click on it and enable it. Notice that you might get the IP address conflict
message. If so, just click OK out of it as this problem will be fixed in Step
4.

3. The third NIC will not be used.

Right click on the lowest-numbered NIC and choose properties from the shortcut menu.
Check to be sure that you have the following networking Components installed:

• Client for Microsoft Networks.


• The NIC adapter (small NIC icon).
• The TCP/IP Protocol (small network cable connection icon).
• File and Printer Sharing for Microsoft

Step 3 - Change the NetBIOS Name

Right-click my computer icon and choose properties. Select the network identification
tab. Click the properties button. In the computer name textbox, change the name to
Station# (where # could be anything from 1-24 depending on the location of the
PC).Leave the default workgroup name as WORKGROUP.

Step 4 - TCP/IP Protocol Settings

For this lab, use the Class C network address of 200.150.100.0 andset the value of the last
octet to equal that of the PC #. Set the default subnet mask on each workstation
to255.255.255.0.Make sure that you are configuring the lowest-numbered NIC

Step 5 - Check the TCP/IP Settings with the Ipconfig /all Utility

Click on Start, Programs and then select the MS-DOS Prompt.Enter the
ipconfig /all command to see all TCP/IP related settings for your workstation.
CSC101 –Lab Manual 110
Fill in the blanks below using the results of the IPCONFIG command from your
workstation:

1. Host name___________________

2. MAC Address________________

3. IP address____________________

4. Subnet Mask_________________

Step 6 - Check the network connection with the Ping Utility

Click on Start, Programs and then the MS-DOS Prompt. Enter the Ping commandfollowed
by the IP address of the other workstation
(Example - ping 200.150.100.1).

Explanation: This will verify that you have a good OSI Layers 1 through 3 connection.

Was the Ping successful? ______________________

Step 7 - Creating and Sharing File Folders

Right-click on my computer icon and choose explore from the short-cut menu.

• Select local disk (C:)


• From the file menu select new then folder. When the new folder Is created,
name it using your first initial and your last name.
• Right-click on the folder and select share
• Select the share this folder option button
• Click on the Permissions button and change Everyone’s permission to read
only.
Open notepad and create a new file. Name the file using your NetBIOS name_Test. Save
the file in the shared folder.

Step 8 - Finding Other Computers and Sharing Resources on a Peer-To-Peer


Network
Sharing Resources by using Universal Naming Convention (UNC):
o From Start select Run
o In the provided textbox type the path to the shared resources that you
want to access on your neighbor’s machine, using the following format :
o \\NetBIOS name\folder name\file name
Sharing resources through mapping logical network drives:
o Right-click my computer icon, then select map a network drive
o Select P as the drive letter, then click on the browse button
o Double-click on the VMWARE workgroup to collapse it

CSC101 –Lab Manual 111


o Select your neighbor’s station then select the shared folder. Click OK, then
Finish
o Double-click on my computer icon to make sure that the logical drive has
been created
o If the need for connection to your neighbor’s PC seizes to exist, then you
could disconnect the logical drive by right-clicking on the logical drive icon
from my computer window, then selecting disconnect.
Searching for computers on the network:
o Right-click on my network places, then select search for computers
o In the computer’s name text box type the name of your neighbor’s
computer that you are trying to find
Viewing all PCs in your workgroup:
o To view all the PCs in your workgroup double-click on my network places,
then select entire network.
o Double-click on entire network. Double click on Microsoft Windows
Network, then click on VMWARE workgroup button.

3) Stage v (verify)
Home Activities:
Activity 1:
Read and understand IPv4 with its classes and have concepts of sub-net masking.

4) Stage a2 (assess)
Assignment:
Managing the MAC Address Table by recording the MAC addresses of the hosts.
Determine the MAC addresses that the switch has learned.

After reading Address Resolution Protocol and Internet Protocol (ARP and IP), please
prepare a table consisting of the MAC addresses and IP addresses in the lab.

CSC101 –Lab Manual 112


LAB # 12

Statement Purpose:
Dreamweaver is a tool for making web sites. We will design and implement Business
models

Activity Outcomes:
Students will design fully-functional multi-page website, complete with

1. a home page
2. Jumping from home to hyper link

Instructor Note:
Study e-commerce business models from chapter 9 (Introduction to computers by Peter
Norton)

CSC101 –Lab Manual 113


1) StageJ(Journey)

Introduction
E-commerce is buying and selling goods and services over the Internet. Ecommerce is part
of e-business. E-business is a structure that includes not only those transactions that center
on buying and selling goods and services to generate revenue, but also those transactions
that support revenue generation. These activities include generating demand for goods and
services, offering sales support and customer service, or facilitating communications
between business partners.

2) Stage a1 (apply)
Lab Activities:
Activity 1:
Install Dreamweaver CS6

Developing business models in Dreamweaver.

Merchant model

Brokerage model

Advertisement model

Solution:
1. Install and configure Dreamweaver.
2. Develop a web page (static or dynamic) showing some sellable items
e.g.
Stationary objects: pen, notebook, calculator etc.

3. To develop brokerage model, create a page with some vendors and some
items with different prices e.g some stationary objects by different
vendors

4. Create a home /main page with many information. Moreover, this page
represents an online store with many categories:
a. Stationary
b. Electronics
c. Garments
d. Grocery, etc.
CSC101 –Lab Manual 114
5. Create subpages with details e.g. stationary
a. Paper
i. Registers
ii. Writing pads
iii. Diaries
iv. A4 pages
b. Electronics
i. Calculator
ii. Usb
iii. Headphones
iv. Mic
c. Writing
i. Pen
ii. Marker
iii. Pencil
iv. Eraser
v. Sharpener

3) Stage v (verify)
Home Activities:
Activity 1:

Implement info-mediary model

4) Stage a2 (assess)
Assignment:
Implement mixed model in Dreamweaver

CSC101 –Lab Manual 115

Das könnte Ihnen auch gefallen