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
Count sign changes in f(x) and f(-x) to list the possible numbers of positive and negative real zeros.
- Tested on a TI calculator
- Version 1.0.1
- 2612 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
- Zero coefficients are ignored when counting sign changes.
- Descartes' Rule gives possible counts, not the actual zeros.
- A negative degree is not a valid polynomial input.
Try the DuckieDai calculator screen
Follow the program's prompts and result flow before downloading.
TI-84 Plus CE Python · screen preview
Exact reviewed bytes
Source code
"""DuckieDai Descartes Rule Solver 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 count_changes(values):signs = []for value in values:if value > 0:signs.append(1)elif value < 0:signs.append(-1)changes = 0for i in range(1, len(signs)):if signs[i] != signs[i - 1]:changes += 1return changesdef possible_zeros(changes):answers = []while changes >= 0:answers.append(changes)changes -= 2return answersdef show_answers(title, answers):clear_screen()print(title)print("-------------")for i in range(len(answers)):if i > 0:print(",", end="")print(answers[i], end="")print("")input("\nPress enter ")def run_test():clear_screen()print("DESCARTES RULE")print("Enter polynomial")print("")degree = int(input("Degree: "))coeffs = []power = degreewhile power >= 0:if power == 0:value = float(input("Const: "))elif power == 1:value = float(input("x coef: "))else:value = float(input("x^" + str(power) + ": "))coeffs.append(value)power -= 1pos_changes = count_changes(coeffs)neg_coeffs = []power = degreefor value in coeffs:neg_coeffs.append(-value if power % 2 == 1 else value)power -= 1neg_changes = count_changes(neg_coeffs)show_answers("POSITIVE ZEROS", possible_zeros(pos_changes))show_answers("NEGATIVE ZEROS", possible_zeros(neg_changes))clear_screen()print("SIGN CHANGES")print("------------")print("Positive:", pos_changes)print("Negative:", neg_changes)duckiedai_intro("Descartes Rule")while True:run_test()print("")if input("Again? y/n: ").lower() != "y":breakclear_screen()print("DuckieDai says: done!")
- Filename
DESCART.py- Size
- 2612 bytes
- SHA-256
e310762456142a6f658562caf34388eeabfb84a2c14e2a70a6bb199a1659018b
Usage
Inputs
- Polynomial degree
- Coefficient of every power from the leading term through the constant
Outputs
- Possible positive-real-zero counts
- Possible negative-real-zero counts
- Sign-change totals
Units: Coefficients are real numbers.
Assumptions and limitations
Assumptions
- Zero coefficients are ignored when counting sign changes.
Constraints
- Descartes' Rule gives possible counts, not the actual zeros.
Known failures
- A negative degree is not a valid polynomial 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
DESCART— 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
- 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.
DESCARTis 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.1 — current version, published . Download this reviewed version
- 1.0.0 — superseded by 1.0.1, 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.
Related learning
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.