Python Syllabus
Python Syllabus
Course title & Credits Credit distribution of the course Eligibility Pre-requisite
Code Lecture Tutorial Practical criteria of the course
/ (if any)
Practice
Programming 2 0 0 2 Class XII NIL
using Python
Learning Objectives
Learning outcomes
● After studying this course, students will be able to interpret the basic representation of the
data structures and sequential programming
● After studying this course, students will be able to gain knowledge of, and ability to use
control framework terminologies.
● After studying this course, students will be able to work out using the core data structures
as lists, dictionaries, tuples, and sets.
● After studying this course, students will be able to choose appropriate programming
paradigms, interrupt and handle data using files to propose solutions through reusable
modules
● After studying this course, students will be able to propose possible error-handling
constructs for unanticipated states/inputs.
● After studying this course, students will be able to implements exemplary applications on
real-world problems.
84
Syllabus
85
● Write a program to use split and join methods in the string and trace a birthday with a
dictionary data structure.
● Write a program combining lists that combines these lists into a dictionary.
● Write a program to count the frequency of characters in a given file. Can you use character
frequency to tell whether the given file is a Python program file, C program file or a text
file?
● Write a program to print each line of a file in reverse order.
● Write a program to compute the number of characters, words and lines in a file.
● Write a function ball collide that takes two balls as parameters and computes if they are
colliding. Your function should return a Boolean representing whether or not the balls are
colliding. Hint: Represent a ball on a plane as a tuple of (x, y, r), r being the radius. If
(distance between two balls centers) <= (sum of their radii) then (they are colliding)
● Find mean, median, mode for the given set of numbers in a list.
● Write a function nearly equal to test whether two strings are nearly equal. Two strings a
and b are nearly equal when a can be generated by a single mutation on b.
● Write a function dups to find all duplicates in the list.
Essential/recommended readings
● "Starting Out with Python plus My Programming Lab with Pearson eText --Access Card
Package (3rd Edition) Tony Gaddis ISBN-13: 978-0133862256".
● Python Crash Course: A Hands-On, Project-Based Introduction to Programming (2nd
Edition).
● Head-First Python: A Brain-Friendly Guide (2nd Edition) by Paul Barry.
● Learn Python the Hard Way: 3rd Edition by Zed A. Shaw.
● Python Programming: An Introduction to Computer Science (3rd Edition) by John M.
Zelle.
● Python Cookbook: Recipes for Mastering Python 3 (3rd Edition) by Brian Jones and David
Beazley.
86