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 polynomial inequality from zeros you already know: enter each distinct zero with its multiplicity and the leading sign, and read the solution intervals.
- Owner-tested on a TI calculator
- Version 1.0.0
- 2795 bytes
- No imports
Before you run it
- TI-84 Plus CE Python · No calculator OS or Python App version has been verified.
- TI Connect CE .py transfer to the Python App; the owner's transfer details were not recorded
- Every real zero of the polynomial is entered once with its correct multiplicity.
- Any factor without real zeros is positive, so the leading sign describes the far right of the graph.
- The program does not find zeros; use a zero finder or factoring first.
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 Inequality From Roots 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 frac(x):for d in range(1,101):n=round(x*d)if abs(x-n/d)<0.000001:if d==1:return str(n)return str(n)+"/"+str(d)return str(round(x,4))def getroot():print("1 whole")print("2 fraction")t=input("Type: ")if t=="2":num=int(input("numerator: "))den=int(input("denominator: "))return num/denelse:return float(input("value: "))duckiedai_intro("Ineq From Roots")n=int(input("Distinct roots: "))roots=[]mult=[]for i in range(n):print("Root",i+1)roots.append(getroot())mult.append(int(input("multiplicity: ")))# Sort roots and multiplicities togetherfor i in range(n):for j in range(i+1,n):if roots[i]>roots[j]:roots[i],roots[j]=roots[j],roots[i]mult[i],mult[j]=mult[j],mult[i]print("Leading sign:")print("1 positive")print("-1 negative")lead=int(input("Sign: "))print("1 >0")print("2 >=0")print("3 <0")print("4 <=0")op=input("Choice: ")sign=[0]*(n+1)if lead>0:sign[n]=1else:sign[n]=-1for i in range(n-1,-1,-1):sign[i]=sign[i+1]if mult[i]%2==1:sign[i]=-sign[i]want=1if op=="3" or op=="4":want=-1include=(op=="2" or op=="4")print("Solution:")found=Falsefor i in range(n+1):if sign[i]==want:found=Trueif i==0:left="-inf"lb="("else:left=frac(roots[i-1])if include:lb="["else:lb="("if i==n:right="inf"rb=")"else:right=frac(roots[i])if include:rb="]"else:rb=")"print(lb+left+","+right+rb)if include:for i in range(n):leftok=sign[i]==wantrightok=sign[i+1]==wantif not leftok and not rightok:found=Trues=frac(roots[i])print("["+s+","+s+"]")if not found:print("EMPTY SET")
- Filename
cubsolv.py- Size
- 2795 bytes
- SHA-256
8a167b5abfe8bbc72c6bcda3efe79c2f62b42ac29a05d09fdd0c303456753463
Usage
Inputs
- How many distinct zeros the polynomial has
- Each zero as a decimal or as a numerator and denominator, with its multiplicity
- Leading sign: 1 for positive, -1 for negative
- One menu choice: 1 greater than zero, 2 greater than or equal, 3 less than zero, 4 less than or equal
Outputs
- Solution intervals written with fractions where possible
- Single points for the or-equal choices when an even-multiplicity zero touches the axis
- EMPTY SET when nothing satisfies the inequality
Units: Polynomial zeros and coefficients; no physical units.
Assumptions and limitations
Assumptions
- Every real zero of the polynomial is entered once with its correct multiplicity.
- Any factor without real zeros is positive, so the leading sign describes the far right of the graph.
Constraints
- The program does not find zeros; use a zero finder or factoring first.
- Signs flip at odd multiplicities and stay the same at even multiplicities.
Known failures
- A fraction with a zero denominator stops with a division-by-zero error.
- A negative count of zeros stops with an index error.
- A menu choice other than 1 to 4 is treated as choice 1.
- Non-numeric input uses the calculator Python input error path.
Compatibility and review
- Review status
- Owner-tested on a TI calculator
- Tested on
- Owner reports personally testing this program on a TI-84 Plus CE Python calculator; the test date, OS version, and Python App version were not recorded
- What happened
- Owner reported pass on the calculator before the DuckieDai opening screen and website line were added. The steps after the opening screen are unchanged and were compared with the owner's file on desktop; this exact file has not yet been rerun on a calculator.
- Dependencies
- No imports
- Suggested calculator name
CUBSOLV— 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. This release has no verified calculator OS or Python App version; treat transfer and execution as unverified until independently tested.
- 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.
CUBSOLVis 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.
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.