CertGrid CertGrid
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

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.

One machine, and any shell with Python 3 will do - these exams test the language, not a distribution.
Server NameIP AddressOSRolesCPURAMHDD
RUNNER01192.168.0.27Ubuntu 26.04 LTSPython 3.14.4 - the only machine this path needs2 Core4 GB50 GB

Before you start

  1. The constants

  2. Four ways to lose a fraction, and they disagree

  3. Powers, roots and logarithms

  4. Trigonometry works in radians

  5. Comparing floats, and testing for the odd values

  6. How math refuses

  7. What the exam does with this objective

Official sources