← Back to Calculator Program Library
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. No entered values, source text, IP address, account, cookie, device identifier, or fingerprint is stored with these counts.
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
Solve a quadratic equation, classify its discriminant, and display real or complex roots.
Usage
Inputs
- Coefficients a, b, and c for a*x^2 + b*x + c = 0
Outputs
- Discriminant classification
- Real or complex roots and an exact-form display
Units: Inputs represent a quadratic equation with a not equal to zero.
Assumptions and limitations
Assumptions
- Exact-form simplification for complex roots assumes integer-like negative discriminants.
Constraints
- The leading coefficient a cannot be zero.
Known failures
- Non-integer negative discriminants can make the exact complex-form simplification less suitable.
Compatibility and review
- Review status
- Tested on a TI calculator
- Tested on
- Creator-owned TI-84 Plus CE Python calculator; exact .py transferred and launched individually
- What happened
- Passed: creator tested the exact program on a personal TI 84 Plus CE Python calculator and confirmed real root, repeated root, and complex root workflows.
- Dependencies
- math
- Suggested calculator name
P4QUAD— 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.
Browser preview
Try the DuckieDai calculator screen
A browser implementation of the documented calculation flow. It does not execute the downloaded Python.
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.
TI-84 Plus CE Python · screen preview
JavaScript is required for the optional browser simulation. Source viewing and downloading remain available without it.
Exact reviewed bytes
Source code
"""DuckieDai Quadratic Solver for TI-84 Plus CE Python."""from math import sqrtdef 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("+----------------------+")print("Loading...")if wait:input("Press enter to start ")print("\n" * 8)def clear_screen():print("\n" * 8)def clean_num(n):if abs(n - round(n)) < 0.0000001:return int(round(n))return round(n, 6)def number(prompt):while True:try:text = input(prompt)if "/" in text:parts = text.split("/")if len(parts) != 2:raise ValueErrortop = float(parts[0])bottom = float(parts[1])if bottom == 0:print("Cannot divide by 0")continuereturn top / bottomreturn float(text)except ValueError:print("Enter a number")print("or fraction")def run_solver():clear_screen()print("ENTER QUADRATIC")print("ax^2+bx+c=0")print("")a = number("a: ")b = number("b: ")c = number("c: ")if a == 0:clear_screen()print("NOT QUADRATIC")print("a cannot be 0")returndisc = b * b - 4 * a * c# SCREEN 1clear_screen()print("DISCRIMINANT")print("------------")print(clean_num(disc))if disc > 0:print("2 real roots")elif abs(disc) < 0.0000001:print("1 repeated root")else:print("2 complex roots")input("\nPress enter ")# SCREEN 2clear_screen()print("ROOTS")print("-----")if abs(disc) < 0.0000001:x = -b / (2 * a)print("x =", clean_num(x))elif disc > 0:x1 = (-b + sqrt(disc)) / (2 * a)x2 = (-b - sqrt(disc)) / (2 * a)print("x1 =", clean_num(x1))print("x2 =", clean_num(x2))input("\nPress enter ")# SCREEN 3clear_screen()print("EXACT FORM")print("----------")print(clean_num(-b), "+/-")print("sqrt(", clean_num(disc), ")")print("over", clean_num(2 * a))else:real = -b / (2 * a)imag = sqrt(-disc) / abs(2 * a)print("x1 =")print(clean_num(real), "+")print(clean_num(imag), "i")print("")print("x2 =")print(clean_num(real), "-")print(clean_num(imag), "i")input("\nPress enter ")# SCREEN 3clear_screen()print("EXACT COMPLEX")print("-------------")imag_disc = int(round(-disc))outside = 1inside = imag_discfactor = 2while factor * factor <= inside:square = factor * factorwhile inside % square == 0:outside *= factorinside //= squarefactor += 1den = int(round(abs(2 * a)))# Reduce outside / denominatorx = outsidey = denwhile y != 0:x, y = y, x % ycommon = xoutside //= commonden //= commonif abs(real) < 0.0000001:if outside == 1 and den == 1:print("x = +/- i")print("* sqrt(", inside, ")")elif den == 1:print("x = +/-", outside, "i")print("* sqrt(", inside, ")")else:print("x = +/-")print(outside, "i*sqrt(", inside, ")")print("over", den)else:print("Real part:")print(clean_num(real))print("")print("Imaginary part:")if outside == 1 and den == 1:print("+/- i")print("* sqrt(", inside, ")")elif den == 1:print("+/-", outside, "i")print("* sqrt(", inside, ")")else:print("+/-")print(outside, "i*sqrt(", inside, ")")print("over", den)duckiedai_intro("Quadratic")while True:run_solver()print("")again = input("Again? y/n: ")if again.lower() != "y":breakclear_screen()print("DuckieDai says: done!")
- Filename
P4QUAD.py- Size
- 4779 bytes
- SHA-256
6d7e67a728fd417773a62cbe68a144a68599d35ef2ed22bf6b36e83ef5e48fcf
Transfer and launch
- Confirm that your calculator is the Python-capable model named above. Check that its OS and Python App versions match the reviewed record.
- Download the
.pysource above and verify its SHA-256 digest if your computer provides that option. - Use TI Connect CE to send the Python file to a compatible calculator.
P4QUADis a suggested name; you may choose another valid, unique calculator name. - Open the Python App, select the program, and check sample inputs before relying on other results.
Read the complete installation, launch, troubleshooting, and removal guide.
Availability does not mean a teacher, school, or exam permits this program. Follow the applicable rules.
Version history
- 1.0.0 — current version, published . Download this reviewed version
Any source change requires a new immutable version and digest. Historical downloads remain available only while their review records remain valid.