0% found this document useful (0 votes)
26 views49 pages

Lab Experiment

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

Lab Experiment

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

DEPARTMENT OF ELECTRICAL ENGINEERING

LAB EXPERIMENT #_01_


COMPUTING FUNDAMENTALS Dated: - -

Roll No: 24-EL____

LAB EXPERIMENT # 01

IDENTIFY BASIC COMPOENENTS OF COMPUTERS, INPUT DEVICES, OUTPUT


DEVICES, BIOS INTRODUCTION.

Lab Learning objectives:


 Identify main parts of desktop computer system
 Understand hardware combination of desktop computer system
 Learn assembling of CPU devices
 Knowing basic terminology related to Computers
Necessary equipment:
 Unassembled CPU
 Desktop Computer System
 Internet on your Lab PC

Background Theory:
What is a Computer? A computer consists mainly of a Central Processing Unit (CPU), a
monitor, a keyboard, and a mouse. Other hardware can include a printer, a scanner, flash drives
and other devices. Below is some basic information about those devices and their uses.

CPU: The main part of the computer is the Central Processing Unit
(CPU), which is the “brains” of the computer. On the outside, you
will see the cd/dvd drives, one or more USB drives, the power
button, and the reset button. Older models may have a 5 ¼ floppy
disc drive.

Flash drives (also called jump drives): Handy compact devices that
you can use to transport your data (documents, photos) from one
computer to another. They can hold much information and are
rewritable, which means you can use them over and over again.
DEPARTMENT OF ELECTRICAL ENGINEERING

Keyboard is an input device to connect with CPU for typing


necessary documents, code, instructions and entering data.
Hardware: The physical devices that make up a computer system,
such as the CPU, printer, keyboard (shown in photo at right),
monitor, mouse, scanner and other material devices.

Mouse: A pointer device that is used to move around the computer


screen. It usually has 2 buttons and a center scroll wheel. The
mouse can do various functions, such as select functions, bring up a
file menu, and open a file.

Printer: A device used to print documents directly from a computer.


Some printers are multi-functional which means they can be used as
a fax, a copier, and a scanner in addition to being a printer.

Software: Programs used to carry out computer functions, such as Microsoft Word;
PowerPoint; Excel, and various photo programs. These programs are knows as application
software. Operating software consists of programs that operate your computer.
.
Lab Task:
1. Make the group of 5 students
2. All should connect power cables to various CPU devices
3. All should connect data cables to hard drive and CD ROM
4. All should connect power cable into mother board
5. All should learn to plug RAM device into mother board
6. All should learn how CPU is inserted into mother board.

Observation Table:

Observations Answer Remarks

Number of RAM slots

Number of Power Cables

Number of Data Cables in CPU

Number of ports in CPU


DEPARTMENT OF ELECTRICAL ENGINEERING

Lab Exercise:
A. Answer the following.
i. Where ROM is located on mother board?
ii. What is procedure of connecting mother board to several other
device

B. Can you define following terms

1. Mouse 2. CPU 3. Monitor 4. Flash Drive

5. Computer 6. Printer 7. Software 8. Hardware

Answers by student:
DEPARTMENT OF ELECTRICAL ENGINEERING

LAB EXPERIMENT #_02___


COMPUTING FUNDAMENTALS Dated: - -

Roll No: 24EL____

LAB EXPERIMENT # 02

INTRODUCTION OF WINDOWS OS AND HANDS-ON EXPIERENCE OF OPERATING


WINDOWS.

Lab Learning Objectives:


 Understand concept of Operating System
 Become familiar with desktop icons, task bar, start menu
Necessary Tools:
 Desktop PC
 Windows 7 or 8

Background Theory:
Turning on the Computer
Most computers have a power switch located on the CPU, either at the top or on the front panel.
Push this switch to turn on (power up or boot) your computer. If your monitor does not come on
when you power up your computer, locate the power button on the monitor and turn it on.
Some computers may require a User Name and Password in order for you to log on. Enter this
information in the space provided and push Enter on your keyboard.

Basic Windows –
Desktop, taskbar, icons and the start menu.
This online video will familiarize your student with the computer desktop
(https://www.youtube.com/watch?v=2v_WnMKl4IA&ab_channel=TeachUComp)
1. Locate the Internet icon on your desktop. Click on it to obtain online access.
2. Type the following in the address bar:
DEPARTMENT OF ELECTRICAL ENGINEERING

3. Select Tutorials in the Green bar.


4. Select Basic Windows 7 Skills.
5. Select Windows 7– Learning Basic Windows Terminology & Skills

The Start Menu


This video on the website Basics for Beginners will help your student become familiar with the
Start Menu. You need online access in order to watch the video. Guide your student through
the first three steps as in the last exercise. This time select The Windows XP Start Menu.
(If your student has just finished watching the previous video, click on Return to Basic
Windows
From the Start Menu you have access to all parts of your computer.
Icons in the Start Menu that are always available for you to select are sometimes called pinned.
The All Programs menu allows you to run any application installed on your computer. Clicking
on My Documents opens a program called Windows Explorer, which allows you to see all the
documents you have stored on your computer.
Internet Explorer allows you to find and interact with web pages on the World Wide Web.
.
Lab Task:
1. Select the PC seat in your lab and reserve it for yourself for coming
weeks
2. Browse through My Computer icon and see available hard drive
partition
3. Check out several option available on right lick of mouse
4. Create your folder in driver other than windows and name the folder
with your roll number and name.
5. Learn various functions of mouse and keyboard by running and
executing several application.
6. Go to start menu and check out what programs are installed.
7. Check our System Information by finding system information in start
menu
8. Check out control panel and see all the options

Can you fill follow table:


DEPARTMENT OF ELECTRICAL ENGINEERING

Window OS Answer Remarks

Desktop contains

Capacity of hard drive on your PC is

Capacity of RAM installed on your PC is

Model and frequency of processor installed is

Lab Exercise:

A. Please list down icons appearing on your desktop PC


B. Take a screen shot of your system information available in start menu
C. Open a notepad, type a paragraph regarding installation of Windows
PC and save it in your folder.
Answers by student:

(Please only paste the screen shot of above exercises on page).


DEPARTMENT OF ELECTRICAL ENGINEERING

LAB EXPERIMENT #_03_


COMPUTING FUNDAMENTALS Dated:

Roll No: 24EL____

LAB EXPERIMENT # 03

MS-OFFICE: MS WORD PRACTICE.

Lab Learning Objectives:


 Practicing MS Word
 Having practical experience to write a professional document in MS
Word
Necessary Tools:
 Desktop PC
 MS-Office installed on your computer
 Separate hand-out of MS-Word in soft copy

Background Theory:

WORD PROCESSORS:

Microsoft word is a sophisticated Word Processing Package that provides a range of features for document
creation and formatting, including many desktop publishing type features, graphics and drawing utilitis. Word can
be used to produce many document types including: Letter, Reports, Memos, Advertisement, CV.
DEPARTMENT OF ELECTRICAL ENGINEERING
DEPARTMENT OF ELECTRICAL ENGINEERING

.
Lab Task

Task No: 1

Title: Document creation, Text manipulation with


Scientific Notations

1. Perform the following in MS-Word


i. Create a new word document and type the following text:

A ROBOT IN THE HOUSE


Correction. You are in error. You are misinforming your father. Correction. The work has not
been done. Your computer has not been used. ERROR, ERROR”. The robot’s voice was
metallic.
TARUN: You are so lucccky Aditi! Manku can do so many things. It can clean the house. It can
answer the telephone, call the doctor and it can even open the door.
ADITI: Wait! There are so many things it can’t do. It can’t laugh. It can’t do MY HOMEWORK
FOR ME. It can’t even help me decide what I should wear for the party.

ii. Save the document as DOCUMENT.DOC


iii. Insert the following text before the conversation between Aditi and Tarun
“Oh! Stop interrupting, Manku”. Aditi said angrily. “You’re are not supposed to participate in
every conversation”
iv. Make the story heading bold, italic and 14 pts.
v. Change the font style of entire story to MS-Comic Sans
vi. Select the heading of the document, cut and paste it at the end of the document
vii. Undo the previous action
viii. Select the first two lines of the paragraph and convert it to uppercase ix. Change all the
uppercase letters to lowercase and vice-versa
x. Change the font style of the last paragraph 12 pts bold italic xi. Copy this format to the first
paragraph using format painter
xii. Highlight the second paragraph (Hint: use highlighter or formatting toolbar)
xiii. Change the font size of the entire text to 14 pts
xiv. Make a copy of this document with a different name (MYBOOK.DOC)
xv. Select the second paragraph of DOCUMENT.DOC and delete it xvi. Undo the above action
and see the effect
xvii. Redo the above action and see the effect
xviii. Delete the entire document (DOCUMENT.DOC)
xix. Open the document MYBOOK.DOC
xx. Show all the nonprinting characters in this document.
DEPARTMENT OF ELECTRICAL ENGINEERING

2. Open document MYBOOK.DOC and perform the following task.


i. Note down the default margins of MYBOOK.DOC
ii. Format the first paragraph with the following measurements: Alignment: justified
Indentation: Left:0.4”, Right:0.4” Special: First line by 0.5”
Line spacing: 1.5 lines
iii. In the end of MYBOOK.DOC type:
MANKU IS A ROBOT NOT A HUMAN BEING.
Make 12 copies of the statement written above and apply all the text attributes
iv. Using different tab stops type the following data in the next page of
MYBOOK.DOC
APEX POLYMERS
S.No Emp# Employee Name Address Salary

1 E001 Ahmed Hyderabad 4000

2 E002 Sameeer Karachi 3000

3 E003 Wasik Larkana 3050

4 E004 Zameer Kashmor 8000

5 E005 Naveed Jacobabad 4000

6 E006 Rahila Lahore 2050

7 E007 Nazir Islambad 3050


v. Give a border to the above written text
vi. Search for the word ROBOT and replace it with ‘ROBOT machine’
vii. Write the following text in the next page of the same document (MYBOOK.DOC)

ix. Open a new document and insert the table with the following data:

First Name Last Name Phone Address


Iram Malik 5236987 Karachi

Akbar Ali 1457896 Lahore

Saboor Qasim 205623 Larkana

Nabeel Ahmed 4579681 Hyderabad

Hyder Ali 1257936 Quetta


DEPARTMENT OF ELECTRICAL ENGINEERING

. Task No: 2

Title: Creating document with Scientific Notations

 Open a new word file and save this file as notation.docs


 Go to INERT → Equations→ Symbols to create following document

Task No: 3

Title: Creating advertisement in word

Create the above advertisement in word.


1. Open a new word document.
2. Type the heading and select the font as Times New Roman, font style as Title color and the
font size as appropriate.
3. Insert the appropriate picture.
4. Select any one WordArt Style and insert in the document.
5. Type the given article and make it into two columns.
6. Insert the given shapes.
7. Apply border to the entire page.
8. Insert header and footer and add the necessary details.
9. Save the document as advertisement.doc.
DEPARTMENT OF ELECTRICAL ENGINEERING

Lab Exercise:

A. Design any one pan flex posted on the wall of Electrical Engineering Department
B. Design your own CV using MS-Word file

Submission:- Submit both of lab exercises in .docs soft copy and hard copy form

LAB EXPERIMENT #_04


DEPARTMENT OF ELECTRICAL ENGINEERING

COMPUTING FUNDAMENTALS Dated:

Roll No: 24EL____

LAB EXPERIMENT # 04

MS-OFFICE: MS POWER POINT and MS EXCEL PRACTICE.

Lab Learning Objectives:


 Practicing MS POWER POINT
 Having practical experience to design standard power point
presentation
 Learn about the new Ribbon interface in PowerPoint 2013 •
 Learn how to create slides, use Themes, and apply color schemes •
 Learn how basic calculations can be made using MS EXCEL
Necessary Tools:
 Desktop PC
 MS-Office installed on your computer
 Separate hand-out of MS-Power Point in soft copy

Background Theory:
MS POWER POINT

Microsoft PowerPoint is a robust application that allows you to combine text,


graphics, and predesigned backgrounds to create professional presentations.
The following is an illustration in how to launch PowerPoint for the first time
user.
DEPARTMENT OF ELECTRICAL ENGINEERING

Lab Task:
This exercise will help you explore some creative, and less standard, ways of using PowerPoint
to create an interactive presentation. Read through the instructions on the following pages for an
idea of some of the things you can do with this program. For this exercise, you will create a
PowerPoint slide show that includes the following six slides (Item numbers from the following
instructions are included in parentheses to help you create each slide.)
1. A “homepage” slide with a title and links or buttons to each of your other five pages. Contains
Title and Design of slides, use Design tab)
2. A slide that uses arrows (and/or circles) and text to label different aspects of a photograph or
graphic image. (Use Insert Tab for this)
3. A slide that uses no words but is an image collage that builds itself automatically. (In other
words, images appear on the page one-at-a-time, automatically timed, to create one large
collage). (see how slide transition works)
4. A slide that has a bulleted list of items that are animated so that the items appear on the page
one-at-a-time. Set it up so that each item dims as the next item appears. (see animation tab and
bullets)
5. A slide that uses a sound effect that is integrally tied to the information on the page (either as an
auditory example of something you are talking about, or as an element that helps to create the
DEPARTMENT OF ELECTRICAL ENGINEERING

context for what you are talking about – for example, birds singing as you talk about the rain
forest.) (Use how effects in animation tab can be used in slide)
6. A slide that links to a web page.
NOTE: Rather than using one of the standard design templates that comes with PowerPoint, this
exercise has you designing your own color scheme and slide layout.
ANOTHER NOTE: Be sure that all sound files are saved in a folder with your PowerPoint
presentation. (This does not include sound effects added from PowerPoint; only sound files that
you have inserted from the Web or from your own computer).
In the Mac Lab, PowerPoint is on your Dock under Microsoft Office (with Word). Double-click
to open it, then select PowerPoint presentation and click OK.

MS EXCEL

Microsoft Excel is a powerful electronic spreadsheet program you can use to automate
accounting work, organize data, and perform a wide variety of tasks. Excel is designed to
perform calculations, analyze information, and visualize data in a spreadsheet. Also this
application includes database and charting features.
DEPARTMENT OF ELECTRICAL ENGINEERING
DEPARTMENT OF ELECTRICAL ENGINEERING

Exercise:

A. Design a good presentation of any of your Computer Fundamentals subject lecture having
all the features of slid design, inserting images, transition of slides and animation of slide.

B. Design the Annual budget sheet using MS EXCEL having following format

Month Income Expenditure Savings Percentage of


Savings

Total
DEPARTMENT OF ELECTRICAL ENGINEERING

LAB EXPERIMENT #_05_


COMPUTIG FUNDAMENTALS
Dated:

Roll No: 24EL___

LAB EXPERIMENT # 05

INTERNET WORLD.

Lab Learning Objectives:

 Learn how to navigate the internet


 Identify and use Search Engines
 Understand the basics of how the Web works
 Conduct an online job search
 Create an email account
 Send and receive messages

Necessary Tools:
 Desktop PC
 Internet Connection
 Browser installed in Windows OS

Background Theory:

Getting Started
Open your internet browser (Internet Explorer, Netscape, or other) by double-clicking the
browser icon located on your desktop or in the Start Menu. This takes you to your Home Page.
The name of the Home Page appears in the address bar.
DEPARTMENT OF ELECTRICAL ENGINEERING

• In the Search bar (located just below the address bar), type the words search engines list.
• Select Search or press the Enter key on your computer. This brings up several sites
from which you can choose.
• Double-click to select Comprehensive list of Search Engines – The Search Engine List.
This brings you to a table that lists various search engines that are used to search the
internet.
Match Up! Put the number of the description in Box A on the line next to the
correct answer in Box B.

Box A Box B

1. The screen you see when you open your Internet Browser 3. Search Engine

2. Where you type the name of a site you wish to visit 4. Email

1. Home page
3. An internet tool you use to search for information

6. Icon
4. An internet tool used to send and receive messages

2. Address bar
5. A popular Search engine

5. Google
6. A picture on your desktop that is a shortcut to a program
or the internet
DEPARTMENT OF ELECTRICAL ENGINEERING

Lab Task:

1. Creating Email Account

There are many email servers that you can choose from to create an email account. For this
lesson, we are going to open an account using 1Yahoo!

• In the address bar, type www.gmail.com


• Near the top of the next screen, you will find New here? Sign Up. Select Sign Up.
• Fill in the information on the next screen. Select "Create My Account"
• The next screen welcomes you to the gmail network and contains important information
about your account. Print it and keep it in a safe place.
2. Sending Email

 In the address bar, type www.gmail.com and select Mail.


 Fill in the user ID and password. Select Sign In.
 If your student has received a welcome message from Gmail, instruct him/her to click on it
to open and read the message.

 Go to New in the top left corner to create a new message.


 Type (your ID)@gmail.com in the bar next to the word To.
 Move your cursor to the Subject line and type the word "test"  Move your cursor to the
body of the message and type a short message.
 Click on Send at the top of the page.

1 http://www.gmail.com
DEPARTMENT OF ELECTRICAL ENGINEERING

LAB EXPERIMENT #_06_


COMPUTING FUNDAMENTALS Dated:

Roll No: 24EL____

LAB EXPERIMENT # 06

INTRODUCTION TO PYTHON

Lab Learning Objectives:

 Basic understanding of Integrated Development Environment


 Basics of writing code, compiling and running the python program
 Python Online IDE, Python Idle installation

Necessary Tools:
 Desktop PC
 Python IDEL or online Python Compiler
(https://www.onlinegdb.com/online_python_compiler#)

Background Theory:

Python is a high-level, interpreted, interactive and object-oriented scripting language. Python


is designed to be highly readable. It uses English keywords frequently where as other
languages use punctuation, and it has fewer syntactical constructions than other languages.
 Python is Interpreted − Python is processed at runtime by the interpreter. You do not
need to compile your program before executing it. This is similar to PERL and PHP.
DEPARTMENT OF ELECTRICAL ENGINEERING

 Python is Interactive − You can actually sit at a Python prompt and interact with the
interpreter directly to write your programs.
 Python is Object-Oriented − Python supports Object-Oriented style or technique of
programming that encapsulates code within objects.
 Python is a Beginner's Language − Python is a great language for the beginner-level
programmers and supports the development of a wide range of applications from
simple text processing to WWW browsers to games.
DEPARTMENT OF ELECTRICAL ENGINEERING

Lab Task:
1. Download the python (https://www.python.org/downloads/) or use online compiler
(https://www.python.org/downloads/

2. Use both type of compilers to get know of python basics

Exercise:

1. Write a python program that prints “Welcome to world of programming”

Submission Guidelines:

1. You have to submit the program in as .py file and copy paste your code and output in
Practical Book
DEPARTMENT OF ELECTRICAL ENGINEERING

Exercise:

Write a python program that print “welcome to world programing “


DEPARTMENT OF ELECTRICAL ENGINEERING

LAB EXPERIMENT #_07


COMPUTING FUNDAMENTALS Dated:

Roll No: 24EL____

LAB EXPERIMENT # 07

WORKING WITH BASIC DATA TYPES OF PYTHON

Lab Learning Objectives:

 Concept of data types in Python


 Variables and Constants in Python

Necessary Tools:
 Desktop PC
 Python IDEL or online Python Compiler
(https://www.onlinegdb.com/online_python_compiler#)

Background Theory:

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 Numbers
Number data types store numeric values. Number objects are created when you assign a value
to them. For example −
var1 = 1
var2 = 10
 int (signed integers)
 long (long integers, they can also be represented in octal and hexadecimal)
 float (floating point real values)
DEPARTMENT OF ELECTRICAL ENGINEERING

Python Strings
 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. Subsets of
 strings can be taken using the slice operator ([ ] and [:] ) with indexes starting at 0 in the
beginning of the string and working their way from -1 at the end.
 The plus (+) sign is the string concatenation operator and the asterisk (*) is the
repetition operator. For example –
DEPARTMENT OF ELECTRICAL ENGINEERING

Python Lists

Lists are the most versatile of Python's compound data types. A list contains items separated
by commas and enclosed within square brackets. To some extent, lists are similar to arrays in
C. One difference between them is that all the items belonging to a list can be of different data
type.

Python Tuples
A tuple is another sequence data type that is similar to the list. A tuple consists of a number of
values separated by commas. Unlike lists, however, tuples are enclosed within parentheses.
The main differences between lists and tuples are: Lists are enclosed in brackets ( [ ] ) and their
elements and size can be changed, while tuples are enclosed in parentheses ( ( ) ) and cannot
be updated.
DEPARTMENT OF ELECTRICAL ENGINEERING

Lab Task:

1. Design your own integer and float variable assigning certain values

2. Create a string having value “Computer Fundamentals” and apply all operations

3. Create list having values, your name, department, roll number, your CPN and apply all operations.

Open-Ended Lab:

1. Write a python program that sets mass of object as integer variable having value 3 and acceleration as
float variable having value 2.7 and calculate force.

2. Initialize a string named “Welcome to department of Electrical Engineering” and apply following
operations on string.

 Access third character of string


 Print 4 to 12 character of string

3. Initialize a python list named subject that contains all the subject of your first semester and apply
following operation on list

 Access 2nd element of list


 Print element 1 to last element of list

Submission Guidelines:

1. You have to submit the program in as .py file and copy paste your code and output in
Practical Book
DEPARTMENT OF ELECTRICAL ENGINEERING

Lab Task:

1. Design your own integer and float variable assigning certain values

2. + Create a string having value “Computer Fundamentals” and apply all operations

3. Create list having values, your name, department, roll number, your CPN and apply all operations
DEPARTMENT OF ELECTRICAL ENGINEERING

LAB EXPERIMENT #__08__


COMPUTING FUNDAMENTALS Dated:

Roll No: 24EL____

LAB EXPERIMENT # 08

WORKING WITH OPERATORS IN PYTHON

Lab Learning Objectives:

 Concept of Operators in Python


 Arithmetic, Compound Arithmetic, Relationship, Logical Operators in
Python

Necessary Tools:
 Desktop PC
 Python IDEL or online Python Compiler
(https://www.onlinegdb.com/online_python_compiler#)

Background Theory:

Types of Operator
Python language supports the following types of operators.

 Arithmetic Operators
 Comparison (Relational) Operators
 Assignment Operators
 Logical Operators

Arithmetic Operators: These operators are responsible for basic arithmetic calculation like, addition,
subtraction, multiplication and division. Following are examples.
DEPARTMENT OF ELECTRICAL ENGINEERING

Comparison or Relational Operator: these operators are used to evaluate the relationship among two
variables or numeric values.

Lab Task:
DEPARTMENT OF ELECTRICAL ENGINEERING

Open-Ended Lab:

Task 1: Write a python program to see the effect of following


Arithmetic operators, also mention the current values as comment
at each coding statement inside main function.

Let a=4; b=3; c=8

 Variable a is added with value of b


 Variable b is multiplied with value c
 Variable a is added with value of 8

Task 2: Write a python program to see the effect of following


Assignment operators, also mention the current values as comment
at each coding statement inside main function.

Let a=4; b=3; c=7

 Variable a is added 4 using arithmetic operator


 Variable b is multiplied with value 2
 Variable c is added with current value of a

Task 3 : Write a python program to see the effect of following


operators, also mention the current values as comment at each
coding statement inside main function.

Let x=5; y=8; z=11; then effect of

x is greater than y

y is not equal to x

z is less or equal to 100

y is equal to 8

Submission:- Submit .py file and past snap shot of code and output in manual
DEPARTMENT OF ELECTRICAL ENGINEERING

LAB EXPERIMENT # 09
COMPUTING FUNDAMENTALS Dated:

Roll No: 24EL___

LAB EXPERIMENT # 9

WORKING WITH OPERATORS IN PYTHON AND VARIABLES

Lab Learning Objectives:

 Concept of Operators in Python


 Arithmetic, Compound Arithmetic, Relationship, Logical Operators in
Python

Necessary Tools:
 Desktop PC
 Python IDEL or online Python Compiler
(https://www.onlinegdb.com/online_python_compiler#)

Background Theory:

Logical operators: perform Logical AND, Logical OR, and Logical NOT operations. It is used to combine
conditional statements.

Operator Description Syntax

and Logical AND: True if both the operands are true x and y

or Logical OR: True if either of the operands is true x or y


DEPARTMENT OF ELECTRICAL ENGINEERING

Lab Task:

 Perform all above examples

Open-Ended Lab:

Task 1. What is output of following code?

Submission:- Submit .py file and past snap shot of code and output in manual
DEPARTMENT OF ELECTRICAL ENGINEERING

LAB EXPERIMENT #_10_


COMPUTING FUNDAMENTALS Dated:

Roll No: 24EL____

LAB EXPERIMENT # 10

WORKING WITH INPUT DATA

Lab Learning Objectives:

 Concept of Operators in Python


 Arithmetic, Compound Arithmetic, Relationship, Logical Operators in
Python

Necessary Tools:
 Desktop PC
 Python IDEL or online Python Compiler
(https://www.onlinegdb.com/online_python_compiler#)

Background Theory:

Input and output in python: Use Python built-in input() function to take integer input from the
user. This input() function returns string data and it can be stored in a string variable. Then use the int()
function to parse into an integer value.
DEPARTMENT OF ELECTRICAL ENGINEERING

Lab Task:

 Perform all above examples

Open-Ended Lab:

Task 1. Write a python program that INPUT mass of object as


float value and velocity of object as integer value. It should
calculate value of momentum.
DEPARTMENT OF ELECTRICAL ENGINEERING

LAB EXPERIMENT #_11_


COMPUTIG FUNDAMENTALS Dated:

Roll No: 24EL____

LAB EXPERIMENT # 11

WORKING WITH VARIABLES

Lab Learning Objectives:

 Concept of variables in Python


 Arithmetic, Compound Arithmetic, Relationship, Logical Operators in
Python

Necessary Tools:
 Desktop PC
 Python IDEL or online Python Compiler
(https://www.onlinegdb.com/online_python_compiler#)

Background Theory:

Variable: Python variable is basically used to store certain value or data. It mainly represents
particular data initialized. Variable keep on changing its value and final depends on last operator used
for particular variable.
DEPARTMENT OF ELECTRICAL ENGINEERING

Lab Task:

 Perform all above examples

Open-Ended Lab:

Task 1. Write is output of following program

LAB EXPERIMENT #_12_


DEPARTMENT OF ELECTRICAL ENGINEERING

COMPUTING FUNDAMENTALS Dated:

Roll No: 24EL___

LAB EXPERIMENT # 12

IF-ELSE STRUTUREE IN PYTHON

Lab Learning Objectives:

 Concept of control structure in Python


 Understanding if-else in Python

Necessary Tools:
 Desktop PC
 Python IDEL or online Python Compiler
(https://www.onlinegdb.com/online_python_compiler#)

Background Theory:

Python if-else statement is used to implement control structure in python:


The if..else statement evaluates test expression and will execute the body of if only when the test
condition is True. If the condition is False, the body of else is executed. Indentation is used to separate
the blocks.

Syntax:
if test expression:
Body of if
else:
Body of else
DEPARTMENT OF ELECTRICAL ENGINEERING

Lab Task:

 Perform all above examples

Open-Ended Lab:

Task 1. Write a python program that takes integer value as input


prints out “Hello World” if value is greater than 30 and
“Goodbye World” if value is less than 30.[use python if-else
structure

Submission:- Submit .py file and past snap shot of code and output in manual
DEPARTMENT OF ELECTRICAL ENGINEERING

LAB EXPERIMENT #_13_


COMPUTING FUNDAMENTALS Dated:
DEPARTMENT OF ELECTRICAL ENGINEERING

Roll No: 24EL____

LAB EXPERIMENT # 13

LOOPS IN PYTHON-1

Lab Learning Objectives:

 Concept of loops in Python


 for-loop in Python
Necessary Tools:
 Desktop PC
 Python IDEL or online Python Compiler
(https://www.onlinegdb.com/online_python_compiler#)

Background Theory:
The for loop in Python is used to iterate over a sequence (list, tuple, string) or other iterable objects.
Iterating over a sequence is called traversal.

Syntax of for Loop

for Val in sequence:


loop body

Here, Val is the variable that takes the value of the item inside the sequence on each iteration.

Loop continues until we reach the last item in the sequence. The body of for loop is separated from the
rest of the code using indentation.
DEPARTMENT OF ELECTRICAL ENGINEERING

Lab Task:

 Perform all above examples

Open-Ended Lab:

Task 1. Write a python program that creates list of odd numbers


and prints out following numbers using for loop.

(i) 97, 94, 91, 88, 85, 82, 79, 76, 73, 70

(ii) 40, 44, 48, 52, 56, 60, 64, 68, 72, 76

Submission:- Submit .py file and past snap shot of code and output in manual
DEPARTMENT OF ELECTRICAL ENGINEERING
DEPARTMENT OF ELECTRICAL ENGINEERING

LAB EXPERIMENT #_14_


COMPUTINNG FUNDAMENTALS
Dated:

Roll No: 24EL____

LAB EXPERIMENT # 14

LOOPS IN PYTHON-2

Lab Learning Objectives:

 Concept of control structure in Python


 Understanding while loop in Python

Necessary Tools:
 Desktop PC
 Python IDEL or online Python Compiler
(https://www.onlinegdb.com/online_python_compiler#)

Background Theory:

The while loop in Python is used to iterate over a block of code as long as the test expression (condition)
is true. We generally use this loop when we don't know the number of times to iterate beforehand.

Syntax of while Loop in Python


while test_expression:
Body of while
In the while loop, test expression is checked first. The body of the loop is entered only if the
test_expression evaluates to True. After one iteration, the test expression is checked again. This process
continues until the test_expression evaluates to False. In Python, the body of the while loop is
determined through indentation. The body starts with indentation and the first unindebted line marks
the end.
DEPARTMENT OF ELECTRICAL ENGINEERING

Python interprets any non-zero value as True. None and 0 are interpreted as False.
DEPARTMENT OF ELECTRICAL ENGINEERING

Lab Task:

 Perform all above examples

Open-Ended Lab:

Task 1. Write a python program while for loop.

(i) 105, 100, 95, 90, 85, 80, 75, 70, 65, 60, 55, 50, 45, 40

(ii) 22, 28, 34, 40, 46, 52, 58, 64, 70, 76, 82, 88, 94, 100

Submission: - Submit .pay file and past snap shot of code and output in manual
DEPARTMENT OF ELECTRICAL ENGINEERING

LAB EXPERIMENT #_15_


COMPUTING FUNDAMENTALS Dated:

Roll No: 24EL___

LAB EXPERIMENT # 15

FUNCTIONS IN PYTHHON

Lab Learning Objectives:

 Concept of FUNCTIONS
 Understanding functions in Python

Necessary Tools:
 Desktop PC
 Python IDEL or online Python Compiler
(https://www.onlinegdb.com/online_python_compiler#)

Background Theory:
In Python, a function is a group of related statements that performs a specific task. Functions help break
our program into smaller and modular chunks. As our program grows larger and larger, functions make
it more organized and manageable. Furthermore, it avoids repetition and makes the code reusable.

Syntax of Function
def function_name(parameters):

statement(s)

Above shown is a function definition that consists of the following components.

 Keyword def that marks the start of the function header.


 A function name to uniquely identify the function. Function naming follows the same rules of
writing identifiers in Python.
 Parameters (arguments) through which we pass values to a function. They are optional.
 A colon (:) to mark the end of the function header.
DEPARTMENT OF ELECTRICAL ENGINEERING

 One or more valid python statements that make up the function body. Statements must have
the same indentation level (usually 4 spaces).
 An optional return statement to return a value from the function.

You might also like