Asee peer logo

Use Of Python In Teaching Discrete Mathematics

Download Paper |


2009 Annual Conference & Exposition


Austin, Texas

Publication Date

June 14, 2009

Start Date

June 14, 2009

End Date

June 17, 2009



Conference Session

Computers and Software in Teaching Mathemathetics

Tagged Division


Page Count


Page Numbers

14.1303.1 - 14.1303.6



Permanent URL

Download Count


Request a correction

Paper Authors

author page

Ali Farahani National University, San Diego

Download Paper |

NOTE: The first page of text has been automatically extracted and included below in lieu of an abstract

USE OF PYTHON IN TEACHING DISCRETE MATHEMATICS Alireza Farahani, Ronald P. Uhlig School of Engineering and Technology, National University, 11255 North Torrey Pines Road, La Jolla, California, U.S.A.


Discrete structures class is among the foundational classes in computer science since it includes materials that are highly pervasive in other areas of computer science such as data structures and algorithm design. A course in discrete structures typically starts with an introduction to logic and mathematical proof techniques then the focus is placed on graph theory with algorithm design and analysis techniques. These topics tend to be difficult to teach and hard to grasp students since materials are often abstract and at times disconnected. In this study we examine the impact of using Python programming language as an aid in teaching a discrete structures class to computer science students. Python is a programming language that supports both object– oriented and functional programming paradigms. It is easy to read and understand with syntax suitable for algorithm development. Python can run in an interactive mode which provides an efficient environment for students to experiment with abstract ideas in order to better understand the concepts.


A discrete structures course is considered to be a foundational in computer science. This is where most students are exposed to formal rigorous mathematical treatment of theoretical aspect of computer science. By the time most students reach this course they have already developed an introductory to intermediate level programming skills. Few educators have attempted to integrate programming into teaching of discrete mathematics. P Chou1 reported using Python in algorithm class with overall positive student evaluation result, however cautioned that improvements must be made. This author happened to believe integrating programming into the discrete structures class can enhance student learning through experimentation. In particular, Python language is most suitable for this purpose because of its intuitive syntax and semantics and close similarity with mathematics notation and algorithmic psudocode. Python provide an interactive window for code testing and simple calculations. This paper described some of the ways in which Python can be employed in teaching discrete structures

System Requirements:

Python is a general purpose programming that is both elegant and pragmatic with a simple intuitive syntax and semantics. The language is very powerful yet it is simple; it is used by both novice and export developers. Python runs on all major hardware platforms and operating

Farahani, A. (2009, June), Use Of Python In Teaching Discrete Mathematics Paper presented at 2009 Annual Conference & Exposition, Austin, Texas. 10.18260/1-2--5540

ASEE holds the copyright on this document. It may be read by the public free of charge. Authors may archive their work on personal websites or in institutional repositories with the following citation: © 2009 American Society for Engineering Education. Other scholars may excerpt or quote from these materials with the same citation. When excerpting or quoting from Conference Proceedings, authors should, in addition to noting the ASEE copyright, list all the original authors and their institutions and name the host city of the conference. - Last updated April 1, 2015