[Link]. Prog.
Computer Science Sem III
DSE 01a: Python Programming for Data Handling
(Admission 2022 onwards)
TOPICS/UNITS Chapter Ref
Week 1 Unit 1 (15 Hours) Ch. 1, Ch. 2, Ch. 3, Ch. 6, [1]
to 5 Introduction to Python Programming, Basic
Constructs, and Python Built-in Data Ch. 7
Structures: Introduction to Python
programming language, Basic syntax,
variables, and data types in Python, Functions
and modular programming; Conditional
statements (if, elif, else); Looping structures
(for and while loops); Mutable and Immutable
Data Structures, Strings- Indexing, slicing,
traversal, operations; Lists-indexing, slicing,
traversal, operations; tuples, dictionaries, and
sets and their operations in Python.
Week 6 Unit 2 (5 Hours) Ch. 9:9.1,9.2 [1]
to 7 File Handling: Opening, reading, writing, and
closing files; File modes and file object methods; Online reference :1
Reading and writing text and binary files; [ [Link]() and [Link](),
Working with CSV files dictReader() and dictWriter()]
Online reference 2[7.2 Reading
and Writing files, 7.2.1]
Week 8 Unit 3 (15 Hours) Ch. 1, Ch. 2, Ch. 3 (Till Reset [2]
to 12 Designing GUI Applications with Tkinter (15): Function)
What is Tkinter? Creating a Tkinter window,
Layout managers, Tkinter widgets -Entry,
Spinbox, Combobox, Checkbutton, Text, Button,
LabelFrame; Implementing the application -
LabelInput class, building of form, adding
LabelFrame and other widgets, retrieving data
from form, resetting form, building our
application class.
Week Unit 4 (10 Hours) Ch. 3 (The Save callback) [2]
13 to 15 Combining Python file handling and Tkinter:
Creating a simple Tkinter application, Reading
and writing to csv files in a Tkinter application.
References
1. Taneja S., Kumar, N. Python Programming- A modular approach, 1st Edition, Pearson Education India,
2018,
2. Moore, Alan D. Python GUI Programming with Tkinter: Develop responsive and powerful GUI
applications with Tkinter. Packt Publishing Ltd, 2021.
Additional References:
1. Guttag, J.V. Introduction to computation and programming using Python, 2nd edition, MIT.
Online references/material:
1. [Link]
2. [Link]
Suggestive Practice Questions:
Installing and setting up Python and relevant libraries; Python development environments (e.g., Anaconda,
Jupyter Notebook)
1. Write a Python program to calculate the factorial of a number.
2. Write a Python program to generate prime numbers between 1 to n, where n is provided as input by
the user.
3. Write a Python program to find the sum and average of numbers of a given list.
4. Given two sets, set1 and set2, write a Python program to find their union, intersection, and difference.
5. Given a list of numbers, write a Python program to count the number of times an element occurs in a
list and create a dictionary with element:count as key:value pairs.
6. Write a Python program to swap the first two and last two characters of a given string.
7. Write a Python program to create a text file having names of ten Indian cities.
8. Write a Python program to create a text file having atleast five lines about your college using
writelines() function.
9. Write a Python program which reads the data from three input files having Employee Names and
merges them into one output file.
10. Write a Python program to count the number of vowels in a file and write the vowel: count in a
dictionary.
11. Write a Python program to create a CSV file having student data: Roll_No, Enrollment No, Name,
Course, Semester.
12. Write a Python program library to read the CSV file created in the above program and filter out
records of II semester students.
13. Write a Python program using tkinter library to create a GUI to enter registration details for an event.
14. Write a Python program using tkinter library to create a calculator to perform addition, subtraction,
multiplication, and division of two numbers entered by the user.
15. Write a Python program using tkinter library to create an age calculator to calculate age when DOB is
entered.
16. Write a Python program using tkinter library to read and write student details namely Roll_No,
Enrollment_No, Name, course, Semester through a form and write the entered details to a CSV file.
Contributors:
1. Prof. Arpita Sharma, Deen Dayal Upadhyaya College.
2. Dr. Veena Ghuriani, Associate Professor, Maitreyi College
3. Ms. Surbhi Khanna, Associate Professor, Rajdhani College
4. Dr. Sheetal Rajpal, Dept. of Comp. Sc., Dyal Singh College