Name Description Size Visibility
53 Bytes Public
Draws the basic-eight color palette of the classic 1977 Atari 2600.
493 Bytes Public
The script bezier1 plots a Bezier curve of degree 1, 2, or 3 in one of four colors: black (0), red (1), green (2), and blue (3). The script uses the ion module, which allows input directly from the keyboard. Edward Shore 5/2/2021
1.95 KB Public
Calculus, Derivative, Sum, Integral (Simpson’s Rule), Solve f(x) = 0 (Newton’s Method)
693 Bytes Public
Looping circles - Turtle module
298 Bytes Public
The following Python script compares a contrast of colored text (foreground) color against a background color. It is important to have good, high contrast. High contrast allows for easy readability and it’s easier on the eyes. This becomes more important when considering web page development to allow accessibility. Sources “How to calculate colour contrast” Accessibility Developer Guide (ADG*). An initiative of Access for all. Last Edited July 29, 2023. Accessed August 8, 2023. https://www.accessibility-developer-guide.com/knowledge/colours-and-contrast/how-to-calculate/ “Relative Luminance” Web Content Accessibility Guidelines (WCAG) 2.0. W3C, Inc. (World Wide Web Consortium, Inc.) Last Edited December 11, 2008. Accessed August 8, 2023. https://www.w3.org/TR/WCAG20/#relativeluminancedef My math and calculator blog: edspi31415.blogspot.com
974 Bytes Public
491 Bytes Public
This script generates a color matrix of random integers 1 through 9, each entry its own colors. Numbers and colors can repeat.
476 Bytes Public
Calculates the cosine similarity between two phrases. When you enter the phrases, do not use punctuation. Exact syntax is matched. Video from StatQuest (January 29, 2023): https://www.youtube.com/watch?v=e9U0QAFbfLI
902 Bytes Public
X-Bar and R Control Chart Source: HP 65 Stat Pac 2, 1975
1.05 KB Public
Solves of the equation: dx/dt = ax(t) + by(t) dy/dt = ax(t) + by(t) with initial conditions x(0) = x0, y(0) = y0
1.13 KB Public
Draws a regular polygon
570 Bytes Public
Draw an ellipse given the length of x and y radii. If x and y are equal, a circle is drawn. The screen is set up to fit the proportion of the 320 x 220 screen. The vertical axis ranges from y = -44 to y = 44 while the horizontal axis ranges from x = -64 to x = 64. The ellipse is centered at (0,0).
349 Bytes Public
Draw a rectangle given its horizontal length (h) and vertical length (v). If the horizontal and vertical lengths are equal, a square is drawn. The rectangle is centered at (0, 0). The screen is set up to fit the proportion of the 320 x 220 screen. The vertical axis ranges from y = -44 to y = 44 while the horizontal axis ranges from x = -64 to x = 64.
333 Bytes Public
Draws an equilateral (60-60-60) triangle. Enter the length of the side (s). The base is set on the x-axis. The screen is set up to fit the proportion of the 320 x 220 screen. The vertical axis ranges from y = -44 to y = 44 while the horizontal axis ranges from x = -64 to x = 64.
299 Bytes Public
Draws an 45-45-90 degree right triangle. Enter the length of the one of the legs (s), not the hypotenuse. The base is set on the x-axis. The screen is set up to fit the proportion of the 320 x 220 screen. The vertical axis ranges from y = -44 to y = 44 while the horizontal axis ranges from x = -64 to x = 64.
284 Bytes Public
Extended Functions - Demonstration of how to create a python file to be used as a module.
530 Bytes Public
Demonstration of how to import a custom module. This must have extf.py loaded to the calculator.
694 Bytes Public
Finance Functions: Python Script Edward Shore - 4/12/2020
1018 Bytes Public
(Planned finance update - 2022)
3.74 KB Public
Generate a bar chart of n integers (recommended that n be at least 20). The first digit from
578 Bytes Public
Create a big flashing box between four colors. Modules used: kandinsky and time.
343 Bytes Public
Using the Turtle module to draw a random-color frame with a brown backing.
755 Bytes Public
Draws an equal sign using the turtle module.
372 Bytes Public
Draw a hexagon using Turtle.
196 Bytes Public
Horner’s Method Evaluation of polynomial p(x) at a point x. p(x) is represented as a list of coefficients with powers in descending order. p(x) = a_n * x^n + a_(n-1) * x^(n-1) + … + a2 * x^2 + a1 * x + a0 l1 = [a_n, a_(n-1), … , a2, a1, a0]
224 Bytes Public
Demonstration of the lambda, filter, and map commands.
602 Bytes Public
Inverse and Determinant of a 3 x 3 matrix
701 Bytes Public
A red box of size 20 pixels by 20 pixels jumps around the screen using the modules kandinsky, time, and random. Numworks’ kandinsky does not have a clear screen (as of Version 23), we create a function to “clear” the screen. We can make the screen anything we want but the following code creates the “boring” white screen: def cls(): fill_rect(0,0,320,220,(255,255,255)) Remember the randrange does NOT include the stop value, so if we want to include the stop value, we will need to add it: randrange(start, stop + 1) randrange(start, stop + step, step)
504 Bytes Public
Lunh Algorithm - tests an integer, like a credit card, to see if the Lunh algorithm. This is used to check to see if a credit card number is valid. Source: “Lunh algorithm” https://www.geeksforgeeks.org/luhn-algorithm/ GeeksforGeeks Retrieved January 1. 2021
375 Bytes Public
Matrix without Numpy
3.77 KB Public
Generate a pixel plot of the equation (x^n + y^n) mod m
310 Bytes Public
Payment on a monthly loan with an partial first period (0 to 59 days). The cash flow convention is used. Source: HP 17BII+ Financial Calculator User’s Guide. Ed. 2. Hewlett Packard. San Diego, CA 2004
545 Bytes Public
Template for plotting functions in the form f(x).
561 Bytes Public
This program draws a 2D motion plot from an initial starting point (x, y) given initial velocity and acceleration. The rate and direction of both velocity and acceleration are assumed to be constant. x(t) = ax * t^2 / 2 + vx * t + x0 y(t) = ay * t^2 / 2 + vy * t + y0 where t = number of seconds. The script uses math and matplot.pyplot modules.
653 Bytes Public
Template for plotting parametric equations (x(t), y(t))
638 Bytes Public
Plot a one-level deep recurrence relation. In the def structure, u for u_n-1.
520 Bytes Public
Perfectly fits a polynomial to a set of points. For a set of n points, a polynomial of degree n-1 can be perfect fit to the set of points. For instance, 2 points fit a perfect line, 3 points fit a quadratic polynomial, and 4 points fit a cubic polynomial. Software version 21 or later is required as the numpy module is used.
743 Bytes Public
Numworks - Python Rotated Plot The script rotplot.py allows the user to choose between one of five equations: 1. y = a + bx 2. y = ax^2 + bx + c 3. y = ax^3 + bx^2 + cx + d 4. y = a * sin(bx + c) + d 5. y = a * exp(bx + c ) + d The original plot is in gray, the rotated plot is in blue.
1.46 KB Public
Game: Unscramble five-letter words
1.53 KB Public
Use the Turtle module to draw a simple race track
621 Bytes Public
Large black squares with small red squares using Turtle.
574 Bytes Public
Synthetic Division p(x) / (x - x0) = q(x) + r / (x - x0) where r is the remainder. p(x) and q(x) are represented as a list of coefficients with powers in descending order. p(x) = a_n * x^n + a_(n-1) * x^(n-1) + … + a2 * x^2 + a1 * x + a0 l1 = [a_n, a_(n-1), … , a2, a1, a0] q(x) is similar and is stored in l2.
312 Bytes Public
The Python script target.py is a game where the player is tasked to guess a mystery number. The game has four levels: Level 0: Easy. Range of 50, number between 100 and 999. Level 1: Medium. Range of 100, number is between 1,000 and 9,999. Level 2: Difficult. Range of 250, number is between 10,000 and 99,999. Level 3: Challenge. Range of 500, numbers if between 100,000 and 999,999. After each guess you will be told whether the target is higher or lower than your guess. At the beginning you are given a range where your target number is. Good luck!
690 Bytes Public
Pick a door and test your luck. Will you win the car? Will you win $5,000? Or is there a goat in the future?
1.3 KB Public
Draws a crystal consisting of four 60-80-100 triangles using the Turtle modules. The triangles are modeled after the 3-4-5 right triangle.
474 Bytes Public
The Python’s Turtle does on a sunny, rest day.
1.24 KB Public

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.