
Explore algebra, statistics, calculus and more with Python, using hands-on coding, chapter-based lessons, and practical projects, supported by a GitHub repository and VS Code workflows.
Learn mathematical operations in python, including addition, subtraction, multiplication, division, floor division, modulus, and exponentiation, and compute square roots with math.sqrt while understanding int and float types and operator precedence.
Identify how to attach a name to a number using a variable label in Python, then explore integers, floats, fractions, and complex numbers, including operations and type conversions.
Learn how to get user input in Python with the input function, convert to int, float, string, fractions, and complex numbers, and handle errors with try/except.
Explore writing Python programs that perform math tasks, including computing factors of integers, generating multiplication tables with nested loops, and handling input and exceptions.
Demonstrates generating multiplication tables in Python with a linear one to ten table and the Chinese 9x9 triangle, using for loops and formatted printing.
Implement a Python unit converter that handles miles to kilometers, inches to meters, and Fahrenheit to Celsius temperature conversions, using a menu-driven interface and formatted output.
Build a quadratic equation root calculator in Python by converting the x1 and x2 formulas into code, using coefficients a, b, c and the discriminant to find roots.
Solve the even-odd vending machine challenge by reading an integer, validating input with try/except and is_integer, then displaying the number followed by the next nine numbers of the same parity.
Enhance the multiplication table generator by allowing the user to specify the base number and the number of multiples, with input validation using try and except and integer checks.
Explore the enhanced unit converter, expanding mass, distance, and temperature conversions (kilometers to miles, kilograms to pounds, Celsius to Fahrenheit) through a multi-layer, menu-driven Python program.
Build a fraction calculator in Python that handles two fractions with basic operations using the fractions library, supports input as spaces or commas, and includes input validation and error handling.
Explore run-until-exit programming by implementing an infinite loop with a user prompt to exit, constructing a menu-driven unit converter and calculator in Python.
Understand the Cartesian coordinate plane—from the number line to the two-dimensional x-y plane—learn axes, quadrants, and basic plotting with matplotlib to visualize data.
Explore lists and tuples in Python, compare mutability, learn indexing, slicing, and appending, and practice iterating with for loops and enumerate to store two-dimensional coordinate pairs.
Create and customize graphs with matplotlib and pylab, including basic and multiple line charts, legends, titles, axis labels, pie plots, and saving figures.
learn to plot the gravitational force between two bodies in two dimensions using Newton's universal gravitation formula with python and matplotlib, exploring inputs, outputs, and adjustable masses and distances.
Plot the trajectory of projectile motion using Python and Matplotlib, deriving ux and uy from the initial speed and angle, and applying gravity to compute time and position.
Plot multiple cities' temperature forecasts with matplotlib by visualizing time-of-day on the x-axis and temperature on the y-axis, adding legends, markers, and grid for clear comparison.
visualize a quadratic function with python and pyplot, plotting y = x^2 + 2x + 1 over a range, compare two functions, and analyze linear versus nonlinear behavior.
Enhance projectile trajectory program to accept multiple velocities and angles, print time of flight and horizontal and vertical distances for each trajectory, and visualize all trajectories with robust input handling.
Learn to visualize weekly expenses with matplotlib by creating a horizontal bar chart, handling categories, data, and axis labeling for clear insights.
Explore the relationship between the Fibonacci sequence and the golden ratio by plotting the ratio of consecutive Fibonacci numbers. See how it converges toward the golden ratio around 1.618.
Explore statistics with Python, compute the mean, and compare to median and mode, then describe data sets and visualize with scatter plots and basic frequency tables.
Learn to compute the median in Python by sorting data, handling odd and even lengths, and comparing it with the mean using practical examples.
Learn to find the mode and build a frequency table using python’s collections.Counter, most_common, and data such as test scores.
Explore dispersion in data by calculating range, variance, and standard deviation, and identify outliers; learn when to use mean versus median for describing data.
Calculate the Pearson correlation coefficient to describe the relation between two data sets, using terms like scatter plots and the zip function for elementwise operations.
Explore calculating and interpreting correlation with Python by comparing high school grades to college admission scores, and visualize the relationship with a scatter plot.
Learn to create scatter plots with matplotlib in Python, plotting x and y pairs and examining their correlation. The lesson covers hard-coded data and multiple charts.
Read data from text and csv files, avoiding hard coding datasets by loading lines into a list and converting them to numbers. Compute the mean and sum from the data.
Read data from a CSV file in Python by parsing two columns with the csv library, skipping headers, collecting numbers and squares, and plotting with matplotlib.
Enhance the correlation coefficient program by validating equal-length x and y, returning none when lengths differ, and compute the product-sum with zip.
Build a statistics calculator that reads numbers from a text file and computes mean, median, variation, and standard deviation. Package functions into reusable library and import them to avoid duplication.
Experiment with csv data to describe us population trends, pre-process, read year and population, plot growth with matplotlib, and compute mean, median, variance, and standard deviation.
Learn to compute a percentile from a sorted data list in Python using the percentile formula, handling 0 and 100 boundaries and reading data from a text file.
Discover two percentile calculation methods for data sets, including the n*p+0.5 formula and an overflow-safe rank approach using numpy and Excel.
Develop a grouped frequency table from data using Python by reading values from a file, computing class intervals, counting frequencies, and printing a formatted table.
Install and configure the SymPy library in Python using pip or conda, verify the setup with simple imports, and begin symbolic algebra with numpy for plotting.
Define symbols and perform symbolic operations using SymPy in Python, introducing single and multiple symbol definitions and simple algebraic manipulations.
Learn to manipulate algebraic expressions with SymPy in doing math with Python: factorize and expand, pretty print, substitute values, simplify results, and convert strings to expressions with error handling.
Learn to solve equations with SymPy in Python by defining symbols, forming equations, and using solve to get x for linear and quadratic cases, including substitutions.
Explore plotting algebraic expressions with sympy plotting, create single and multiple function graphs, customize titles and axis labels, and save plots to png while handling symbols and simple solving.
Learn to build a factor finder in Python with SymPy, read a user expression, simplify and factor it, then print the factors while handling invalid inputs.
Implement a graphical equation solver that reads two expressions, simplifies them, solves a system of two linear equations, and plots the lines to reveal their intersection and solution.
Explore programming challenges for summing a series in Python, enabling direct expression input with SymPy. Build a tool that prints, sums, and substitutes values for arbitrary series.
Solve single-variable inequalities using Python and SymPy, covering polynomial and rational cases with solve_poly_inequality, solve_rational_inequalities, and solve_univariate_inequalities, plus building a solver that selects the method for polynomial, rational, or expressions.
Explore the definition and construction of sets in Python, learning that sets store distinct, well-defined elements, support membership tests, and relate through subsets, supersets, and the power set with cardinality.
Explore set relationships by defining subset and superset, understanding their inverse relationship, examining the power set and cardinality, and distinguishing proper subset and proper superset with Python and SymPy examples.
Explore core set operations including union, intersection, and Cartesian product, illustrated with Python and SymPy finite sets, and learn how to apply these operators to multiple sets.
explains core probability concepts, including experiment, sample space, and events, and demonstrates the uniform distribution while applying Python to compute prime-number outcomes on a 20-sided die, using union and intersection.
Explore probability and random number generation using Python's random module, including decimal and randint outputs, by simulating six-sided dice until a target score is reached within limited rolls.
Explore non-uniform random numbers in Python by simulating a biased coin and a non-uniform ATM dispenser. Learn how varying probabilities map to outcomes with cumulative sums.
Visualize relationships between two sets with a venn diagram using matplotlib-venn, exploring union, intersection, and exclusive regions. Apply to odd numbers versus primes under 20 and a student sports survey.
Explore the law of large numbers by simulating six-sided dice, comparing the rolling averages to the expected value of 3.5, and verifying convergence as trial counts grow.
Simulate a Python coin toss game: start with a balance, win on heads, lose on tails, and stop when the balance reaches zero, using random and a while loop.
Shuffle a 52-card deck in Python using random.shuffle, constructing the deck from suits and ranks and optionally preserving the original order, with a set-based alternative.
Explore estimating the area of a circle using a Monte Carlo approach with random darts, tracking inside points to approximate pi, the radius, and circle area in Python.
Explore drawing geometric shapes with Matplotlib patches by creating a circle patch, adding it to an axis, and configuring the figure, axis, and aspect to render a true circle.
Create animated geometric shapes with matplotlib patches, using patch objects and the animation module to grow a circle across frames, adjusting the radius and interval.
Animate a projectile trajectory using matplotlib patches, extending earlier geometry lessons by calculating motion from initial velocity and angle under gravity, updating a moving circle along the path.
Explore fractal drawing by applying point transformations in the plane, using random rule selection and iterations to generate zigzag paths and Mandelbrot set patterns, with Python coding and plotting.
Draw the Barnsley fern fractal in Python by applying four transformation rules with non-uniform probabilities to generate varied leaf patterns through iterative point updates.
Pack circles into a square by drawing the square with Matplotlib polygon patches and filling it with radius-0.5 circles via a nested loop from the lower-left corner.
Master drawing the Sierpinski triangle with Barnsley-style fractal rules, using three affine transforms, equal probabilities, and point plotting in Python.
Explore Henon's function by iterating a 2D transformation up to 20,000 times to reveal the attractor and compare static and dynamic plots on the 2D plane.
Master the Mandelbrot set by building a 6x6 grayscale heat map with matplotlib's imshow, using a list of lists and image display foundations for the upcoming Python drawing challenges.
Learn to draw the Mandelbrot set using the escape time algorithm in Python, exploring fractal generation, complex plane mapping, and color-based rendering.
Position a function as a mapping from a domain to a range, linking inputs to outputs. Use Python, including SymPy, to handle numeric and symbolic calculus.
Master SymPy assumptions and symbols to evaluate relational expressions, and compute limits of functions, including infinity and zero, using limit and doit.
learn to compute derivatives in Python with SymPy, including single-variable and partial derivatives for multivariable functions, and build a derivative calculator using subs, doit, and pretty print.
Explore higher order derivatives to locate maxima and minima, using first and second order derivatives and the second derivative test on critical points, with Python demonstrations.
Explore gradient ascent to find the global maximum (and minimum) of a function, using initial values, step size, and epsilon, with a basic and a generic one-variable approach.
Explore how initial values, step size, and epsilon affect gradient ascent to find the global maximum, and add checks for solvability and robustness in gradient-based optimization.
Explore integrals as the inverse of derivatives, including indefinite and definite integrals, and apply them to probability density functions with Python libraries SymPy and SciPy.
This programming challenge teaches verifying a function's continuity at a point by comparing left and right limits to f(a) using a SymPy-based checker.
Implement gradient descent and ascent to locate maxima or minima of a function, compare approaches, and plot the function alongside intermediate values.
Compute the area between two curves by integrating the upper function minus the lower over a to b, using user-input single-variable functions and bounds.
Compute arc length of a curve using the definite integral of sqrt(1+(f'(x))^2) from a to b, with a Python program that inputs a one-variable function and prints the length.
Closing lecture for doing math with Python summarizes appendix a and b, discusses software setup with VS code or anaconda, and highlights Python practices like __name__ guard and code reuse.
Transform Your Logical Thinking: Where Mathematics Meets Enterprise-Grade Programming
Most people learn math as a series of abstract formulas on a chalkboard. Most people learn coding as a set of syntax rules. This course is different. Led by Xiaoqi Zhao (Yasen), a Global Enterprise Architect with nearly 30 years of industry experience, this course approaches mathematics through the lens of Architectural Logic and Automation. We don't just solve for $x$; we build the systems that visualize, analyze, and automate the solution.
Why Learn Math from an Enterprise Architect?
In the corporate world, "math" isn't just a school subject—it's the foundation of data integrity, security encryption, and systemic optimization.
As an instructor who has led architectural initiatives for global giants like Volvo, HP, and Accenture, I bring a unique perspective to your learning journey:
Systemic Thinking: Learn to see the "Big Picture" and how mathematical modules fit into larger software architectures.
Precision & Structure: Apply the same rigor used in TOGAF and ArchiMate frameworks to your Python scripts.
The "Code from Scratch" Philosophy: In an era of copy-paste coding, I teach you to build from the ground up. By manually typing every mathematical algorithm, you develop a "muscle memory" for logic that AI tools cannot replace.
A Journey from Fractions to Fractals
Moving step-by-step through seven core pillars, we will explore:
Algebraic Automation: Solving complex equations using the SymPy library.
Data Visualization: Mastering Matplotlib to turn raw numbers into professional-grade insights.
Statistical Foundations: Implementing mean, variance, and standard deviation to prepare you for Data Science.
Geometry & Fractals: Exploring recursive logic and geometric patterns.
Calculus in Action: Programmatically calculating derivatives and integrals.