Using the full toolkit? Read the step-by-step Polynomial Toolkit guide for quartic, cubic, and quadratic workflows, worked examples, and a reminder to keep every root you find.
algebra · MIT License
Overview
Simplify a non-negative integer square root by extracting repeated square factors.
- Tested on a TI calculator
- Downloaded 74 times
- Version 1.0.1
- 2116 bytes
- No imports
Tried it? Did this program work on your calculator?
Before you run it
- TI-84 Plus CE Python · tested on OS 5.8.3, Python App 5.8.3.0048
- TI Connect CE .py conversion to a Python AppVar in RAM; physically tested one program at a time
- The program simplifies real square roots only.
- Negative radicands are rejected.
- Decimal input is not accepted because the calculator source uses integer input.
Try the DuckieDai calculator screen
A browser implementation of the documented calculation flow. It does not execute the downloaded Python.
TI-84 Plus CE Python · screen preview
Learn the math
How simplifying a square root works
The idea
A square root is in simplest form when the number under it has no perfect-square factors left. You pull each perfect square out in front as its own square root.
Teachers usually want radicals in this form, and it makes like terms such as 3*sqrt(2) and 5*sqrt(2) easy to combine.
The formula
sqrt(a^2 * b) = a*sqrt(b)
a- the whole number that comes out in front
b- what stays under the root, with no square factors
Using the program
- Enter the whole number under the square root.
- The program shows the simplified form, or tells you it is already simple or a perfect square.
Worked example
Simplify the square root of 72. Enter 72.
72 = 36 x 2, and sqrt(36) = 6
The program shows sqrt( 72 ) = 6 * sqrt( 2 ).
Doing it by hand
When no perfect-square factor jumps out, break the number into primes. Every pair of equal primes under the root comes out in front as a single copy, and anything without a partner stays underneath.
Simplify the square root of 180 this way.
180 = 2 x 2 x 3 x 3 x 5
There is a pair of 2s and a pair of 3s, so 2 and 3 come out and multiply to 6. The 5 has no partner and stays.
sqrt(180) = 6*sqrt(5)
Check by squaring the outside number and multiplying back: 6 x 6 x 5 = 180. The same check catches the most common slip, which is leaving a square factor such as 4 or 9 under the root.
Tips and common mistakes
- Look for the largest perfect-square factor: 4, 9, 16, 25, 36, 49, ...
- The program works with non-negative whole numbers.
- sqrt(50) is 5*sqrt(2), not 25*sqrt(2): the square root of 25 comes out, not 25 itself.
Where this comes up
Simplifying radicals is taught in algebra 1 and geometry and is used whenever the Pythagorean theorem, the distance formula, or the quadratic formula produces a square root.
Go further: Solving Quadratic Equations: Factoring, Completing the Square, or the Formula
Exact reviewed bytes
Source code
"""DuckieDai Radical Simplifier for TI-84 Plus CE Python."""def duckiedai_intro(program_name, wait=True):title = program_name[:16]empty = 16 - len(title)left = empty // 2right = empty - leftprint("+----------------------+")print("| " + " " * left + title + " " * right + " |")print("| |")print("| __ |")print("| ___(o )> quack! |")print("| \\ <_. ) |")print("| `---' |")print("| by DuckieDai |")print("| hiddenwordscanner.com|")print("+----------------------+")print("Loading...")if wait:input("Press enter to start ")print("\n" * 8)def clear_screen():print("\n" * 8)def simplify_radical(n):outside = 1inside = nfactor = 2while factor * factor <= inside:square = factor * factorwhile inside % square == 0:outside *= factorinside //= squarefactor += 1return outside, insidedef run_solver():clear_screen()print("RADICAL SIMPLIFIER")print("------------------")print("Enter number under")print("the square root.")print("")n = int(input("sqrt: "))if n < 0:clear_screen()print("NEGATIVE RADICAL")print("Use positive")print("number only.")returnoutside, inside = simplify_radical(n)clear_screen()print("RESULT")print("------")if n == 0:print("sqrt(0) = 0")elif inside == 1:print("Perfect square!")print("")print("sqrt(", n, ") =")print(outside)elif outside == 1:print("Already simple:")print("")print("sqrt(", inside, ")")else:print("sqrt(", n, ") =")print("")print(outside, "* sqrt(", inside, ")")duckiedai_intro("Radical Simpl")while True:run_solver()print("")again = input("Again? y/n: ")if again.lower() != "y":breakclear_screen()print("DuckieDai says: done!")
- Filename
P5RAD.py- Size
- 2116 bytes
- SHA-256
d52f985280a11744b7a7bbe7a3c93bddff15ef53445dbc01540a77a31c596412
Usage
Inputs
- Non-negative integer under the square root
Outputs
- Simplified radical or perfect-square result
Units: The input is a non-negative integer.
Assumptions and limitations
Assumptions
- The program simplifies real square roots only.
Constraints
- Negative radicands are rejected.
Known failures
- Decimal input is not accepted because the calculator source uses integer input.
Compatibility and review
- Review status
- Tested on a TI calculator
- Tested on
- Owner-tested TI-84 Plus CE Python calculator; exact branded .py transferred and launched individually
- What happened
- Passed: owner tested the exact 1.0.1 branded source bytes on a TI 84 Plus CE Python calculator.
- Dependencies
- No imports
- Suggested calculator name
P5RAD— you can give it another valid, unique name when you transfer it- Desktop test cases
- Not available for this interactive-only source
This exact source auto-launches an interactive calculator session, so compatibility evidence comes from the recorded physical-device review rather than an importable desktop fixture.
Transfer and launch
Download the .py file, send it to your calculator with TI Connect CE as P5RAD or another name, then open the Python App and try the worked example on this page first.
Full installation and troubleshooting guide. Check your teacher's or exam's rules before using any program.
Version history
- 1.0.1 — current version, published . Download this reviewed version
- 1.0.0 — superseded by 1.0.1, published . Download this reviewed version
Related learning
Did a DuckieDai program help with your homework? Every program here is free. If you would like to say thanks, you can leave a tip on Cash App ($duckiedai214) or read what tips pay for.
Independent compatibility resource: Hidden Word Scanner is independent and is not affiliated with or endorsed by Texas Instruments. TI product names describe compatibility only.
Action-count privacy: Successful downloads, preview starts, and preview completions increment same-origin aggregate counters, and so does a Yes or No answer about whether the program worked. Your browser notes that you answered; that note is never sent to the site. No entered values, source text, IP address, account, cookie, device identifier, or fingerprint is stored with these counts.