About This Interactive Book · Welcome!

Why do we need code in a math course?

Nikolai Chukhin · Alexander S. Kulikov

Why do we need code in a math course?

  • Applications.  Python examples will show you a wide range of practical applications of discrete mathematics.

  • Interactive examples.  Code can be used to create interactive examples: copy the code, change its parameters, run it, and see what happens.

  • Deeper understanding.  Implementing a method from discrete mathematics will help you understand all its details.

But why Python rather than another language?

  • High-level language.  It is relatively easy to start programming in Python, even if you have never programmed before: the code is compact and easy to read.

  • Interactive mode.  Python can be used interactively to communicate with the computer through a REPL (read-eval-print loop).

  • Batteries included.  Many libraries allow you to draw a graph, plot a function, generate a random sequence, and much more in just a few lines of code.