0% found this document useful (0 votes)
0 views5 pages

DSC C BCA 353P - MAJOR - Practical Solutions Using Python

The course 'Practical Solutions Using Python' focuses on teaching Python programming, Object Oriented Programming concepts, database connectivity, data analysis, and visualization using Pandas and Matplotlib. It includes practical exercises across four units covering data types, functions, OOP, exception handling, and database management. Upon completion, students will gain proficiency in Python syntax, database connectivity, and data analysis techniques.
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)
0 views5 pages

DSC C BCA 353P - MAJOR - Practical Solutions Using Python

The course 'Practical Solutions Using Python' focuses on teaching Python programming, Object Oriented Programming concepts, database connectivity, data analysis, and visualization using Pandas and Matplotlib. It includes practical exercises across four units covering data types, functions, OOP, exception handling, and database management. Upon completion, students will gain proficiency in Python syntax, database connectivity, and data analysis techniques.
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/ 5

Course Name: Practical Solutions Using Python

Course Code: DSC-C-BCA-353 P

Credits: 4

Course Outcomes:
On the completion of the course practically students will:
1. Understand the Python programming and Object Oriented Programming concepts.
2. Understanding Python Database connectivity
3. Understanding Data analysis and Data Visualization in Python using Pandas and Matplotlib

Prerequisites:
Basic computer skills, such as saving files in multiple versions and formats

Unit Particulars Hours Credits


1 Introduction to Python ,Data Types and Control Flow Statements 30 01
1 Write a program to swap two numbers without taking a
temporary variable
2 Write a program to display sum of two complex numbers.
3 Write a program to create a byte type array, read, modify, and
display the elements of the array
4 Create a sequence of numbers using range datatype to display 1
to 30, with an increment of 2.
5 Write a program to find out and display the common and
the non common elements in the list using membership
operators
6 Create a program to display memory locations of two
variables using id() function, and then use identity
operators two compare whether two objects are same or not.
7 Write a program that evaluates an expression given by
the user at run time using eval() function. Example: Enter and
expression: 10+8-9*2- (10*2) Result: -20
8 Write a menu driven program to perform the
following menu: (1) Find Area of Circle (2) Find
Area of Triangle (3) Find Area of Square (4)
Find Simple Interest (5) Exit. (using match-case)
9 Write a program to assert the user enters a number greater
than zero
10 Write a program to search an element in the list using
for loop and also demonstrate the use of “else” with for loop.
11 Write a python program that asks the user to enter a length in
centimeters. If the user enters a negative length, the program
should tell the user that the entry is invalid. Otherwise, the
program should convert the length to inches and print out the
result. (2.54 = 1 inch)
2 Arrays , Functions, List, Tuples and Dictionaries 30 01
1 Create a program to retrieve, display and update only a range of
elements from an array using indexing and slicing in arrays
2 Write a program to understand various methods of array class
mentioned: append, insert, remove, pop, index, ,tolist and
count.
3 Write a program to sort the array elements using bubble sort
technique.
4 Create a program to search the position of an element in
an array using index() method of array class.
5 Write a program to generate prime numbers with the
help of a function to test prime or not.
6 Write a python program that removes any repeated items
from a list so that each item appears at most once. For
instance,the list [1,1,2,3,4,3,0,0] would become [1,2,3,4,0].
7 Write a program to pass a list to a function and display it.
8 Write programs to demonstrate the use of Positional
Argument, keyword argument , default arguments , variable
length arguments
9 Write a lambda/Anonymous function to find bigger
number in two given numbers
10 Create a program name “employee.py” and implement the
functions DA, HRA, PF, and ITAX. Create another program that
uses the function of employee module and calculates gross and
net salaries of an employee
11 Write a program to create a list using range functions and
perform append, update and delete elements operations
in it.
12 Create a sample list of 7 elements and implement the List
methods mentioned: append, insert, copy, extend, count,
remove, pop, sort, reverse and clear.
13 Write a program to create nested list and display its
elements.
14 Write a program to accept elements in the form of a tuple and
display its minimum, maximum, sum and average.
15 Create a program to sort tuple with nested tuples
16 Create a dictionary that will accept cricket players name and
scores in a match. Also we are retrieving runs by entering the
player’s name.
17 Write a program to convert the elements of two lists into key-
value pairs of a dictionary.
18 Create a python function to accept python function as a
dictionary and display its elements.
3 Concepts of OOP and Exception Handling 30 01
1 Write a program to create a Student class with a constructor
having more than one parameter . Also create a method named
display() to view the student details.
2 Write a program to demonstrate the use of instance and
class/static variables
3 Write a program to store data into instances using
mutator methods and to retrieve data from the instances using
accessor methods.
4 Write a program to use class method to handle the
Common features of all the instance of Student class.
5 Write a program to create a static method that counts the
number of instances created for a class.
5 Create a Bank class with two variables Name and Balance. Implement
a constructor to initialize the variable. Also implement deposit and
withdrawal using instance methods.
6 Create a Student class to with the methods set_id, get_id,
set_name, get_name, set_marks and get_marks where the
method name starting with set are used to assign the values and
method name starting with get are returning the values. Save
the program by student.py.
Create another program to use the Student class which is already
available in student.py.
7 Write a program to access the base class constructor and
method in a sub class by using super().
8 Write a program to implement single inheritance in
which two sub classes are derived from a single base class.
9 Write a program to implement multiple inheritance
using two base classes.
10 Write a program to understand the order of execution of methods
in several base classes according to method resolution order
(MRO)
11 Write a program to check the object type to know
whether the method exists in the object or not.
12 Write a program to overload the addition operator (+) to make
it act on the class objects.
13 Write a program to show method overloading to find sum of two
or three numbers.
14 Write a program to override the super class method in
Subclass
15 Write a program to handle some built in exceptions like
ZeroDivisionError
16 Write a program to handle multiple exceptions

4 Python Database Management. Data Analysis and Data 30 01


Visualization
1 Write a program to create a database named “Sample_DB” in
MySQL(). And create an EMPLOYEE Table in it with fields
like eid,name and sal. Also enter some valid records in table.
First ensure connection is made or not and then check if the
database Sample_DB already exists or not, if yes then print
appropriate message. Also display all records of Employee table.
2 Write a program to increase the salary (sal) of an employee in
the employee table by accepting the employee identity number
(eid) from the user.
3 Write a program to delete a row from an employee table by
accepting the employee identity number (eid) from the user
4 Create a Pandas Series from a list of integers
5 Create a dataframe from .csv file
6 Create a dataframe from a dictionary
7 Create a DataFrame with columns ['Name', 'City']. Access
column "City" and display it
8 Create a DataFrame with columns ['Name', 'Age', 'Score']. Sort
the DataFrame based on the 'Score' column in descending order.
9 Create a DataFrame
df = pd.DataFrame ({'A': [1, None, 3], 'B': [None, 4, 5]}).
Fill missing values in column 'A' & ‘B’ with 0
10 Create two DataFrames & Merge the two DataFrames(using merge())
based on the 'ID' column.
df1 = pd.DataFrame({'ID': [1, 2], 'Name': ['Krishna ', 'Arjun']})
df2 = pd.DataFrame({'ID': [1, 2], 'Age': [25, 30]})
11 Create a DataFrame
df = pd.DataFrame({'Category': ['A', 'B', 'A', 'B'], 'Value': [10,
20, 30, 40]}).
Group the data by the 'Category' column and calculate the multiple
aggregation functions like mean, maximum and minimum of the
'Value' for each group.
12 Write a program to display employee id numbers on X-axis
and their salaries on Y- axis in the form of bar graph
13 Write a program to display employee id numbers on X-axis and
their salaries on Y- axis in the form of bar graph for two
departments of a company
14 Write a program to display a histogram showing the number of
employees of specific age groups.
15 Write a program to display a pie chart showing the percentage
of employees in each department of a company
16 Write a program to create a line graph to show the profits of a
company in various years

Text Book :
1. Core Python Programming
By Dr. R. Nageshwara Rao , 2nd Edition
2. Learning Pandas 2.0 by Matthew Rosch

Reference Books:
1. A Byte of Python, By Swaroop C H
2. Python Cookbook, Recipes of Mastering
Python 3, By David Beazely & Brian K. Jones
3. Pandas for Everyone: Python Data Analysis by Daniel Y. Chen
Web Resources:
https://www.python.org/about/apps/
https://www.w3schools.com/python/default.asp
https://www.programiz.com/python-programming/tutorial
https://www.programiz.com/python-programming/match-case
https://www.w3resource.com/python-exercises/pandas/index.php

Required Softwares:
Python 3.10 or higher
IDE: IDLE
Database: MySQL

Accomplishments of the student after completing the Course:


After completion of this course, students will be able to
 Gain Proficiency in Python Syntax and implement various python programs
 Implement Python Database Connectivity.
 Implement Data Analysis with Pandas and Data Visualization using Matplotlib in Python

***** * *****

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy