def p(s):print(s)
def o1():
p("=DIFF SQR=")
p("a2-b2")
p("=(a-b)(a+b)")
def o2():
p("=PERF SQR=")
p("a2+2ab+b2")
p("=(a+b)^2")
p("a2-2ab+b2")
p("=(a-b)^2")
def o3():
p("=AC METH=")
p("ax2+bx+c")
p("find m,n:")
p("m*n=a*c")
p("m+n=b")
def menu():
while True:
p("=FACT QUAD=")
p("1:DIFF SQR")
p("2:PERF SQR")
p("3:AC METH")
p("0:EXIT")
c=input("?>")
if c=="1":o1()
elif c=="2":o2()
elif c=="3":o3()
elif c=="0":break
menu()Tier 1 · algebra
Factor Quad Ref
Reference card for quadratic factoring rules.
Files (1)
How to use it
This is a reference card — no math inputs, just factoring patterns on screen.
Launch FACTQUAD from prgm. Pick a pattern from the main menu:
1:DIFF SQR— difference of squares.2:PERF SQR— perfect-square trinomials.3:AC METH— the AC method forax²+bx+cwhena ≠ 1.0:EXIT— leave the program.
Each pattern prints the recipe in 3–4 lines, then returns to the menu.
Example problem
You're factoring x² − 9 on a quiz and can't remember the shortcut.
- Run
FACTQUAD. - Pick
1:DIFF SQR. - Screen shows:
a2-b2=(a-b)(a+b).
Apply with a=x, b=3: x² − 9 = (x−3)(x+3). ✓
TI-84 Plus CE — try before committingoff
TI-84 Plus CE
(calculator off) Press ON to start.
Test cases (2)
| ID | Inputs | Expected contains |
|---|---|---|
| diff-squares | 1, 0 | a2-b2 |
| perf-squares | 2, 0 | a2+2ab |