Hidden WordScanner
Private scans · No account required

DuckieDai Radical Simplifier

Simplify a non-negative integer square root by extracting repeated square factors.

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

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.

JavaScript is required for the optional browser simulation. Source viewing and downloading remain available without it.

Simulation boundary: This preview uses a reviewed browser adapter. It does not execute the downloaded Python and does not prove TI-Python or calculator compatibility.

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

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

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

Download .py

View source below, copy it when JavaScript is available, or download the exact .py bytes.

  1. """DuckieDai Radical Simplifier for TI-84 Plus CE Python."""
  2. def duckiedai_intro(program_name, wait=True):
  3. title = program_name[:16]
  4. empty = 16 - len(title)
  5. left = empty // 2
  6. right = empty - left
  7. print("+----------------------+")
  8. print("| " + " " * left + title + " " * right + " |")
  9. print("| |")
  10. print("| __ |")
  11. print("| ___(o )> quack! |")
  12. print("| \\ <_. ) |")
  13. print("| `---' |")
  14. print("| by DuckieDai |")
  15. print("| hiddenwordscanner.com|")
  16. print("+----------------------+")
  17. print("Loading...")
  18. if wait:
  19. input("Press enter to start ")
  20. print("\n" * 8)
  21. def clear_screen():
  22. print("\n" * 8)
  23. def simplify_radical(n):
  24. outside = 1
  25. inside = n
  26. factor = 2
  27. while factor * factor <= inside:
  28. square = factor * factor
  29. while inside % square == 0:
  30. outside *= factor
  31. inside //= square
  32. factor += 1
  33. return outside, inside
  34. def run_solver():
  35. clear_screen()
  36. print("RADICAL SIMPLIFIER")
  37. print("------------------")
  38. print("Enter number under")
  39. print("the square root.")
  40. print("")
  41. n = int(input("sqrt: "))
  42. if n < 0:
  43. clear_screen()
  44. print("NEGATIVE RADICAL")
  45. print("Use positive")
  46. print("number only.")
  47. return
  48. outside, inside = simplify_radical(n)
  49. clear_screen()
  50. print("RESULT")
  51. print("------")
  52. if n == 0:
  53. print("sqrt(0) = 0")
  54. elif inside == 1:
  55. print("Perfect square!")
  56. print("")
  57. print("sqrt(", n, ") =")
  58. print(outside)
  59. elif outside == 1:
  60. print("Already simple:")
  61. print("")
  62. print("sqrt(", inside, ")")
  63. else:
  64. print("sqrt(", n, ") =")
  65. print("")
  66. print(outside, "* sqrt(", inside, ")")
  67. duckiedai_intro("Radical Simpl")
  68. while True:
  69. run_solver()
  70. print("")
  71. again = input("Again? y/n: ")
  72. if again.lower() != "y":
  73. break
  74. clear_screen()
  75. 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

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.