0% found this document useful (0 votes)
33 views19 pages

Lab Manual

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

Lab Manual

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

SAL Institute of Technology & Engineering

Research

Computer Department

Python for Data Science (3150713)

LAB MANUAL
INDEX

Sr. Page No.


Experiment Date Marks Signature
No. From To

Write a Python Program to Convert Celsius to


1. Fahrenheit and vice versa

Write a program in python to swap two


2. variables without using temporary variable.

Write a Python Program to Convert Decimal to


3. Binary, Octal and Hexadecimal.
Write a Python program to perform following
4. operation on given string input:
a) Count Number of Vowel in given string
b) Count Length of string (donot use len() )
c) Reverse string
d) Find and replace operation
e) check whether string entered is a palindrome
or not

Write a program in python to implement


5. Fibonacci series up to user entered number.
(Use recursive Function)
Define a procedure histogram() that takes a list of
6. integers and prints a histogram to the screen. For
example, histogram([4, 9, 7]) should print the
following:
****
*********
*******

Write a Python program to convert a Panda


7. module Series to Python list and it's type

Write a Python program to add, subtract,


8. multiple and divide two Pandas Series
Write a Python program to convert a dictionary to
9. a Pandas series.
Sample = {'a': 100, 'b': 200, 'c':300, 'd':400,
'e':800}

Write a Pandas program to convert a NumPy


10. array to a Pandas series.
11. Write a Pandas program to convert Series of lists
to one Series.
Original Series of list
0 [Red, Green, White]
1 [Red, Black]
2 [Yellow]dtype: object
One Series
0 Red
1 Green
2 White
3 Red
4 Black
5 Yellow
12.
Write a Python program to draw a line with
suitable label in the x axis, y axis and a title.

13. Write a Python program to plot two or more lines


on same plot with suitable legends of each line.

14. Write a Python programming to display a bar


chart of the popularity of programming
Languages.
Sample data:
Programming languages: Java, Python, PHP,
JavaScript, C#, C++
Popularity: 22.2, 17.6, 8.8, 8, 7.7, 6.7
The code snippet gives the output shown in the
following screenshot
15. Write a Python programming to create a pie chart
of the popularity of programming Languages.
Sample data:
Programming languages: Java, Python, PHP,
JavaScript, C#, C++
Popularity: 22.2, 17.6, 8.8, 8, 7.7, 6.7
The code snippet gives the output shown in the
following screenshot:
Experiment No: 1 Date:

TITLE: Write a Python Program to Convert Celsius to Fahrenheit and vice versa.

EVALUATION:

Problem
Understanding Timely
Analysis & Mock Total
Level Completion
Solution (2) (10)
(3) (2)
(3)

Signature:
Experiment No: 2 Date:

TITLE: Write a program in python to swap two variables without using temporary variable.

EVALUATION:

Problem
Understanding Timely
Analysis & Mock Total
Level Completion
Solution (2) (10)
(3) (2)
(3)

Signature:
Experiment No: 3 Date:

TITLE: Write a Python Program to Convert Decimal to Binary, Octal and Hexadecimal

EVALUATION:

Problem
Understanding Timely
Analysis & Mock Total
Level Completion
Solution (2) (10)
(3) (2)
(3)

Signature:
Experiment No: 4 Date:

TITLE: Write a Python program to perform following operation on given string input:
a) Count Number of Vowel in given string
b) Count Length of string (donot use len() )
c) Reverse string
d) Find and replace operation
e) check whether string entered is a palindrome or not

Problem Analysis &


Understanding Level Timely Completion Mock
Solution
(3) (2) (2)
(3)

Signature:
Experiment No: 5 Date:

TITLE: Write a program in python to implement Fibonacci series up to user entered number. (Use recursive
Function).

EVALUATION:

Problem Analysis &


Understanding Level Timely Completion Mock
Solution
(3) (2) (2)
(3)

Signature:
Experiment No: 6 Date:

TITLE: Define a procedure histogram() that takes a list of integers and prints a histogram to the screen. For
example, histogram([4, 9, 7]) should print the following:

****
*********
*******.

EVALUATION:

Problem Analysis &


Understanding Level Timely Completion Mock
Solution
(3) (2) (2)
(3)

Signature:
Experiment No: 7 Date:

TITLE: Write a Python program to convert a Panda module Series to Python list and it's type.

EVALUATION:

Problem Analysis &


Understanding Level Timely Completion Mock
Solution
(3) (2) (2)
(3)

Signature:
Experiment No: 8 Date:

TITLE: Write a Python program to add, subtract, multiple and divide two Pandas Series

EVALUATION:

Problem Analysis &


Understanding Level Timely Completion Mock
Solution
(3) (2) (2)
(3)

Signature:
Experiment No: 9 Date:

TITLE: Write a Python program to convert a dictionary to a Pandas series.


Sample = {'a': 100, 'b': 200, 'c':300, 'd':400, 'e':800}

EVALUATION:

Problem Analysis &


Understanding Level Timely Completion Mock
Solution
(3) (2) (2)
(3)

Signature:
Experiment No: 10 Date:

TITLE: Write a Pandas program to convert a NumPy array to a Pandas series.

EVALUATION:

Problem Analysis &


Understanding Level Timely Completion Mock
Solution
(3) (2) (2)
(3)

Signature:
Experiment No: 11 Date:

TITLE: Write a Pandas program to convert Series of lists to one Series.

One Series
Original Series of list 0 Red
0 [Red, Green, White] 1 Green
1 [Red, Black] 2 White
2 [Yellow] 3 Red
dtype: object 4 Black
5 Yellow

EVALUATION:

Problem Analysis &


Understanding Level Timely Completion Mock
Solution
(3) (2) (2)
(3)

Signature:
Experiment No: 12 Date:

TITLE: Write a Python program to draw a line with suitable label in the x axis, y axis and a title.

EVALUATION:

Problem Analysis &


Understanding Level Timely Completion Mock
Solution
(3) (2) (2)
(3)

Signature:
Experiment No: 13 Date:

TITLE: Write a Python program to plot two or more lines on same plot with suitable legends of each line.

EVALUATION:

Problem Analysis &


Understanding Level Timely Completion Mock
Solution
(3) (2) (2)
(3)

Signature:
Experiment No: 14 Date:

TITLE: Write a Python programming to display a bar chart of the popularity of programming Languages.
Sample data:
Programming languages: Java, Python, PHP, JavaScript, C#, C++
Popularity: 22.2, 17.6, 8.8, 8, 7.7, 6.7
The code snippet gives the output shown in the following screenshot:

EVALUATION:

Problem Analysis &


Understanding Level Timely Completion Mock
Solution
(3) (2) (2)
(3)

Signature:
Experiment No: 15 Date:

TITLE: Write a Python programming to create a pie chart of the popularity of programming Languages.
Sample data:
Programming languages: Java, Python, PHP, JavaScript, C#, C++
Popularity: 22.2, 17.6, 8.8, 8, 7.7, 6.7
The code snippet gives the output shown in the following screenshot:

EVALUATION:

Problem Analysis &


Understanding Level Timely Completion Mock
Solution
(3) (2) (2)
(3)

Signature:

You might also like