Concepts·Certified Associate Python Programmer
Python math Module
PCAP objective 1.2 is perform evaluations using the math module, and it is one of the most answerable objectives in either exam - the functions do what their names say. Two things are worth care: there are four different ways to turn a float into an integer and they disagree on negative numbers, and every trigonometric function takes radians, so `sin(90)` is not 1.
Modules and Packages Guide 5 of 25 Intermediate
- Python3.14.4
- OSUbuntu 26.04 LTS
- pip25.1.1
- TimeAbout 15 min
- Reviewed23 August 2026
Written against the versions above. `math.isclose` arrived in Python 3.5 and `math.cbrt` in 3.11. Everything the syllabus names has been present since Python 3.0 and behaves identically.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| RUNNER01 | 192.168.0.27 | Ubuntu 26.04 LTS | Python 3.14.4 - the only machine this path needs | 2 Core | 4 GB | 50 GB |
Before you start
-
The constants
-
Four ways to lose a fraction, and they disagree
-
Powers, roots and logarithms
-
Trigonometry works in radians
-
Comparing floats, and testing for the odd values
-
How math refuses
-
What the exam does with this objective