0% found this document useful (0 votes)
7 views62 pages

Skill Lab-Python Programming - Lab Manual

The document outlines the Python Programming Skill Lab Course (CSL405) for the SE - IV Semester at K.C. College of Engineering and Management Studies and Research. It includes the vision and mission of the Department of Computer Engineering, program educational objectives, lab objectives, and outcomes, as well as a detailed index of experiments and programs to be conducted. The course aims to equip students with practical skills in Python programming, data handling, and various programming concepts.

Uploaded by

shreyt1501
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)
7 views62 pages

Skill Lab-Python Programming - Lab Manual

The document outlines the Python Programming Skill Lab Course (CSL405) for the SE - IV Semester at K.C. College of Engineering and Management Studies and Research. It includes the vision and mission of the Department of Computer Engineering, program educational objectives, lab objectives, and outcomes, as well as a detailed index of experiments and programs to be conducted. The course aims to equip students with practical skills in Python programming, data handling, and various programming concepts.

Uploaded by

shreyt1501
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

Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

PYTHON PROGRAMMING SKILL LAB COURSE


[CSL405]
MANUAL
SE – IV SEM [A.Y:2023-2024]
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Department of Computer Engineering

Vision
To create proficient graduates with technical knowledge and social value.

Mission
● To improvise teaching and learning process through modern tool usage.
● To encourage participation between department and industry through internships and interactions.
● To cater ethical and value based education by addressing social needs.
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Programme Educational Objectives

● PEO1 - ANALAYTICAL SKILLS: Formulate Solve and Analyse Engineering Problems in the
field of Computer Engineering

● PEO2 - TEAM WORKING ABILITY: Ability to work in teams and represent leadership abilities

● PEO3 - ETHICAL PROFFESIONAL ABILITY: Ability to portray Ethical Actions and practices
in the trade
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Lab Objectives:

⮚ To write, test, and debug simple Python programs.

⮚ To implement Python programs with conditionals and loops.

⮚ Use functions for structuring Python programs.

⮚ Represent compound data using Python lists, tuples, and dictionaries.

⮚ Read and write data from/to files in Python.

Lab Outcomes:

Upon completion of the course, students will be able to

⮚ Write, test, and debug simple Python programs.

⮚ Implement Python programs with conditionals and loops.

⮚ Develop Python programs step-wise by defining functions and calling them.

⮚ Use Python lists, tuples, dictionaries for representing compound data.

⮚ Read and write data from/to files in Python


Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Introduction about lab


Python is a general purpose, high-level programming language; other high- level languages you
might have heard of C++, PHP, and Java. Virtually all modern programming languages make us of
an Integrated Development Environment (IDE), which allows the creation, editing, testing, and
saving of programs and modules. In Python, the IDE is called IDLE (like many items in the
language, this is a reference to the British comedy group Monty Python, and in this case, one of its
members, Eric Idle).

Many modern languages use both processes. They are first compiled into a lower level language,
called bytecode, and then interpreted by a program called a virtual machine. Python uses both
processes, but because of the way programmers interact with it, it is usually considered an
interpreted language.
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

INDEX

[Link]/ Topic List of Programs Pg Dat Sign


Progra No e
m .No s.
A) Create a list and perform the following
Python methods
datatypes 1) insert()
2) remove()
3) append()
4) len()
5) pop()
6) clear()
B) Create a dictionary and apply the following
Python methods
1 datatypes 1) Print the dictionary items
2) access items
3) use get()
4)change values
5) use len()
6) Create nested dictionaries
C) Create a tuple and perform the following
Python methods
datatypes 1) Add items
2) len()
3) check for item in tuple
4)Access iems
5) typecasting of tuple
A) Write a python program to make a
calculator for performing the following
operation using operators. (Arithmetic
Operators)
1) Addition
Operators 2) Subtraction
3) Multiplication
4) Division
2 5) Modulus
6) Exponent
B) Write a program to perform various
Operators relational operations

Operators C) Write a program to perform various


logical operators
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering


A)Write a Python program to check if a triangle
Conditional is equilateral, isosceles or scalene.
Statement
3 B) Write a program to read a number and print
Conditional the reverse of the number using while.
Statement
C) Write a program to print the frequency of
Conditional negative and positive numbers in a given list
Statement
A) Write a python program to check whether
Functions the given string is palindrome or not.
B) Write a python program to find factorial of a
4 Functions
given number using functions
Functions C) Write a program to double a given number
and add two numbers using lambda()?

Classes & A)Write a program to read 5 subject marks of 5


objects students and print the total marks of each
student.
5 Classes & B) Write a program to create vehicle class and
objects derive its properties into bike class
Classes & C)Write a program
objects 1) to overload the right-shift operator
2) to overload the left-shift operator
6 Exception A) De
handling monstrate a python code to implement abnormal
termination?
B) Demonstrate a python code to print try,
except and finally block statements
File A)Write a program to find longest word from a
Handling file

File B) Write a program to count the number of


7 Handling lines, words & character in the input file

File C) Write a program to print the contents of a


Handling file in the reverse order
8 Stack,Queue Menu driven program for data structure using
& Linked list built in function for
1)link list
2)stack and
3)queue.
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

9 Tkinter Creating GUI with python containing widgets


such as labels, textbox,radio,checkboxes
and custom dialog boxes.
10 Python Program to demonstrate CRUD(create, read,
DataBase update and delete) operations on database
Connectivity (SQLite/ MySQL) using python
11 Networking Creation of simple socket for basic information
in python exchange between server and client.
12 Django Creating web application using Django web
framework to demonstrate functionality of
user login and registration (also validating user
detail using regular expression).

13 Multithreadi Programs on Threading using python.


ng A) Write a program to handle multiple
threads for 10 milliseconds
B) Write a program to handle the producer-
consumer problem
Numpy A) Exploring Numpy module

Numpy B) Using a numpy module create an array


and check the following:
14 1. Type of array 2. Axes of array
3. Shape of array 4. Type of elements in array
Numpy C) Using a numpy module create array and
check the following:
1. List with type float 2. 3*4 array with all zeros
3. From tuple 4. Random values
15 Dataframes A) Write a python program to concatenate the
& data series data frames with two different objects
using pandas
Dataframes B) Write a python code to read a csv file using
& data series pandas module and print the first and last five
using pandas lines of a file.
16 Program to send email and read content ofURL.
17 Mini Project
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Total Grade / Marks:

Avg. marks of Experiments Avg. marks of Assignments Total Marks


(A) (B) (A+B)

Obtained Out of Obtained Out of

_________________________ _______________________
Practical In charge Internal Examiner
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering


Program Outcomes

Engineering Graduates will be able to:


1. Engineering knowledge: Apply the knowledge of mathematics, science, engineering
fundamentals, and an engineering specialization to the solution of complex engineering
problems.

2. Problem analysis: Identify, formulate, review research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of
mathematics, natural sciences, and engineering sciences.

3. Design/development of solutions: Design solutions for complex engineering problems


and design system components or processes that meet the specified needs with appropriate
consideration for the public health and safety, and the cultural, societal, and environmental
considerations.

4. Conduct investigations of complex problems: Use research-based knowledge and


research methods including design of experiments, analysis and interpretation of data, and
synthesis of the information to provide valid conclusions.

5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modelling to complex engineering
activities with an understanding of the limitations.

6. The engineer and society: Apply reasoning informed by the contextual knowledge to
assess societal, health, safety, legal and cultural issues and the consequent responsibilities
relevant to the professional engineering practice.

7. Environment and sustainability: Understand the impact of the professional engineering


solutions in societal and environmental contexts, and demonstrate the knowledge of, and
need for sustainable development.

8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering


9. Individual and team work: Function effectively as an individual, and as a member or
leader in diverse teams, and in multidisciplinary settings.

10. Communication: Communicate effectively on complex engineering activities with the


engineering community and with society at large, such as, being able to comprehend and
write effective reports and design documentation, make effective presentations, and give and
receive clear instructions.

11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member
and leader in a team, to manage projects and in multidisciplinary environments.

12. Life-long learning: Recognize the need for, and have the preparation and ability to
engage in independent and life-long learning in the broadest context of technological change.
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Experiment 1

Aim: ________________________________________________________

Lab Outcome: _________________________________________________

Date of Conduction: Date of Submission:

Implementation Understanding Punctuality & Total


(05) (05) Discipline (15)
(05)

________________________
Practical In Charge
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

PROGRAM-1 Date:

Aim:

A) Create a list and perform the following methods

1) insert()
2) remove()
3) append()
4) len()
5) pop()
6) clear()

Program:

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering


B) Create a dictionary and apply the following methods

1) Print the dictionary items


2) access items
3) use get()
4) change values
5) use len()

Program:

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering


C) Create a tuple and perform the following methods
1) Add items
2) len()
3) check for item in tuple
4) Access iems

Program:

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Experiment 2

Aim: ________________________________________________________

Lab Outcome: _________________________________________________

Date of Conduction: Date of Submission:

Implementation Understanding Punctuality & Total


(05) (05) Discipline (15)
(05)

________________________
Practical In Charge
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

PROGRAM-2 Date:
Aim:

A) Write a python program to make a calculator for performing the following operation using
operators. (Arithmetic Operators)
1) Addition
2) Subtraction
3) Multiplication
4) Division
5) Modulus
6) Exponent

Program:

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

B) Write a program to perform various relational operations

Program

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

C) Write a program to perform various logical operators

Program

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering


Experiment 3

Aim: ________________________________________________________

Lab Outcome: _________________________________________________

Date of Conduction: Date of Submission:

Implementation Understanding Punctuality & Total


(05) (05) Discipline (15)
(05)

________________________
Practical In Charge
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering


PROGRAM-3 Date:

Aim:

A) Write a Python program to check if a triangle is equilateral, isosceles or scalene.

Program:

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

B) Write a program to read a number and print the reverse of the number using while.

Program

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

C) Write a program to print the frequency of negative and positive numbers in a given array

Program

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Experiment 4

Aim: ________________________________________________________

Lab Outcome: _________________________________________________

Date of Conduction: Date of Submission:

Implementation Understanding Punctuality & Total


(05) (05) Discipline (15)
(05)

________________________
Practical In Charge
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

PROGRAM-4 Date:

Aim:
A) Write a python program to check whether the given string is palindrome or not.

Program:

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

B) Write a python program to find factorial of a given number using functions

Program

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

C) Write a program to double a given number and add two numbers using lambda()?

Program

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Experiment 5

Aim: ________________________________________________________

Lab Outcome: _________________________________________________

Date of Conduction: Date of Submission:

Implementation Understanding Punctuality & Total


(05) (05) Discipline (15)
(05)

________________________
Practical In Charge
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering


PROGRAM-5 Date:

Aim:
A) Write a program to read 5 subject marks of 5 students and print the total marks of each student.

Program:

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering


B) Write a program to create vehicle class and derive its properties into bike class

Program

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

C) Write a program
1) to overload the right-shift operator
2) to overload the left-shift operator

Program

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Experiment 6

Aim: ________________________________________________________

Lab Outcome: _________________________________________________

Date of Conduction: Date of Submission:

Implementation Understanding Punctuality & Total


(05) (05) Discipline (15)
(05)

________________________
Practical In Charge
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

PROGRAM-6 Date:

Aim:
A) Demonstrate a python code to implement abnormal termination?

Program:

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

B) Demonstrate a python code to print try, except and finally block statements

Program

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering


Experiment 7

Aim: ________________________________________________________

Lab Outcome: _________________________________________________

Date of Conduction: Date of Submission:

Implementation Understanding Punctuality & Total


(05) (05) Discipline (15)
(05)

________________________
Practical In Charge

PROGRAM-7 Date:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering


Aim:
A) Write a program to find longest word from a file

Program

Output:

B) Write a program to count the number of lines, words & character in the input file
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Program

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering


C) Write a program to print the contents of a file in the reverse order

Program

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering


Experiment 8

Aim: ________________________________________________________

Lab Outcome: _________________________________________________

Date of Conduction: Date of Submission:

Implementation Understanding Punctuality & Total


(05) (05) Discipline (15)
(05)

________________________
Practical In Charge

PROGRAM-8 Date:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering


Aim:

Menu driven program for data structure using built in function for
1) link list
2) stack and
3) queue.

Program:

Output:

Experiment 9
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Aim: ________________________________________________________

Lab Outcome: _________________________________________________

Date of Conduction: Date of Submission:

Implementation Understanding Punctuality & Total


(05) (05) Discipline (15)
(05)

________________________
Practical In Charge

PROGRAM-9 Date:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Aim:

Creating GUI with python containing widgets such as labels, textbox,radio,checkboxes


and custom dialog boxes.

Program:

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Experiment 10

Aim: ________________________________________________________

Lab Outcome: _________________________________________________

Date of Conduction: Date of Submission:

Implementation Understanding Punctuality & Total


(05) (05) Discipline (15)
(05)

________________________
Practical In Charge
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

PROGRAM-10 Date:

Aim:

Program to demonstrate CRUD(create, read, update and delete) operations on database


(SQLite/ MySQL) using python

Program

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Experiment 11

Aim: ________________________________________________________

Lab Outcome: _________________________________________________

Date of Conduction: Date of Submission:

Implementation Understanding Punctuality & Total


(05) (05) Discipline (15)
(05)

________________________
Practical In Charge
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering


PROGRAM-11 Date:

Aim:

Creation of simple socket for basic information exchange between server and client.

Program

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Experiment 12

Aim: ________________________________________________________

Lab Outcome: _________________________________________________

Date of Conduction: Date of Submission:

Implementation Understanding Punctuality & Total


(05) (05) Discipline (15)
(05)

________________________
Practical In Charge
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

PROGRAM-12 Date:

Aim:
Creating web application using Django web framework to demonstrate functionality of
user login and registration (also validating user detail using regular expression).

Refer to this link :


[Link]

Program:

Output:

Experiment 13
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Aim: ________________________________________________________

Lab Outcome: _________________________________________________

Date of Conduction: Date of Submission:

Implementation Understanding Punctuality & Total


(05) (05) Discipline (15)
(05)

________________________
Practical In Charge

PROGRAM 13 Date:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Aim:

Programs on Threading using python.


A) Write a program to handle multiple threads for 10 milliseconds

Program:

Output:

B) Write a program to handle the producer-consumer problem


Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Program

Output:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering


Experiment 14

Aim: ________________________________________________________

Lab Outcome: _________________________________________________

Date of Conduction: Date of Submission:

Implementation Understanding Punctuality & Total


(05) (05) Discipline (15)
(05)

________________________
Practical In Charge

PROGRAM-14 Date:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Aim:

A) Exploring Numpy module

Program

Output:

B) Using a numpy module create an array and check the following:


Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering


1. Type of array 2. Axes of array
3. Shape of array 4. Type of elements in array

Program

Output:

C) Using a numpy module create array and check the following:


Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering


1. List with type float 2. 3*4 array with all zeros
3. From tuple 4. Random values

Program

Output:

Experiment 15
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Aim: ________________________________________________________

Lab Outcome: _________________________________________________

Date of Conduction: Date of Submission:

Implementation Understanding Punctuality & Total


(05) (05) Discipline (15)
(05)

________________________
Practical In Charge

PROGRAM 15 Date:
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering


Aim:

A) Write a python program to concatenate the data frames with two different objects

Program

Output:

B) Write a python code to read a csv file using pandas module and print the first and last five lines of
a file.
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Program

Output:

Experiment 16
Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

Aim: ________________________________________________________

Lab Outcome: _________________________________________________

Date of Conduction: Date of Submission:

Implementation Understanding Punctuality & Total


(05) (05) Discipline (15)
(05)

________________________
Practical In Charge

PROGRAM -16 Date:


Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering


Aim:

Program to send email and read content of URL.

You can use Python’s built-in smtplib module to send email using SMTP (Simple Mail Transfer Protocol),
which is an application-level protocol. Note that the module makes use of RFC 821 protocol for SMTP.
I’ll show you how to use Gmail’s SMTP server for this walkthrough.

1. Set up a Gmail account for sending your emails. Since you’ll be feeding a plaintext password to the
program, Google considers the SMTP connection less secure.
2. Go to the account settings and allow less secure apps to access the account. As an aside, Gmail doesn't
necessarily use SMTP on their internal mail servers; however, Gmail SMTP is an interface enabled by
Google's [Link] server. You might find [Link] in email clients like Thunderbird,
Outlook, and others.
3. Import smtplib. Since Python comes pre-packaged with smtplib, all you have to do is create a Python
file and import smtplib into it.
4. To create a secure connection, you can either use SMTP_SSL() with 465 port or .starttls() with 587
port. The former creates an SMTP connection that is secured from the beginning. The latter creates an
unsecured SMTP connection that is encrypted via .starttls().

To send email through SMTP_SSL():


Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

To send email through .starttls():


Excelssior Education Society’s

K.C. College of Engineering and Management Studies and Research


Mith Bunder Road, Near Hume Pipe, Kopri, Thane (E)-400603

Department of Computer Engineering

You might also like