← 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.
geometry · MIT License
Overview
Solve a lattice polygon's area, interior-point count, or boundary-point count with Pick's theorem.
Usage
Inputs
- Requested unknown: area, interior points, or boundary points
- Nonnegative interior count and positive boundary count where applicable
Outputs
- Requested Pick's-theorem quantity or invalid-result warning
Units: Area is in square coordinate units; point counts are whole numbers.
Assumptions and limitations
Assumptions
- The polygon is a lattice polygon and Pick's theorem applies.
Constraints
- The TI program validates nonnegative or positive whole-number point counts.
Known failures
- Non-lattice or inapplicable polygons produce an incorrect interpretation.
Compatibility and review
- Review status
- Tested on a TI calculator
- Tested on
- TI-84 Plus CE Python; OS 5.8.3; Python App 5.8.3.0048; exact source owner-tested through TI Connect CE
- What happened
- Owner confirmed the supplied Pick's theorem program runs on the physical calculator.
- Dependencies
- No imports
- Suggested calculator name
PICKTHE— 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 Pick's theorem
This browser preview calculates area from interior and boundary point counts. The TI program also solves the inverse counts.
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.
JavaScript is required for the optional browser simulation. Source viewing and downloading remain available without it.
Exact reviewed bytes
Source code
"""DuckieDai Pick's Theorem for TI-84 Plus CE Python."""def duckiedai_intro(program_name, wait=True):"""Show the reusable DuckieDai program opening."""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" * 6)def whole_number(prompt):"""Require a nonnegative whole number."""while True:try:value = int(input(prompt))if value >= 0:return valueexcept ValueError:passprint("Enter a whole number")print("0 or greater.")def positive_whole(prompt):"""Require a positive whole number."""while True:try:value = int(input(prompt))if value > 0:return valueexcept ValueError:passprint("Enter a whole number")print("above 0.")def positive_number(prompt):"""Require a positive number."""while True:try:value = float(input(prompt))if value > 0 and value < 1e100:return valueexcept ValueError:passprint("Enter a number above 0.")def main():duckiedai_intro("PICKS THEOREM")print("PICK'S THEOREM")print()print("A = i + b/2 - 1")print()print("i = interior points")print("b = boundary points")print()print("What do you need?")print()print("1. Area")print("2. Interior points")print("3. Boundary points")print()choice = input("Choose 1-3: ")print()# ==========================================# 1. SOLVE AREA## A = i + b/2 - 1# ==========================================if choice == "1":i = whole_number("Interior points: ")b = positive_whole("Boundary points: ")area = (i +b / 2 -1)print()print("Using:")print("A = i + b/2 - 1")print()print("A = " + str(i))print("+ " + str(b) + "/2")print("- 1")print()print("ANSWER")print("Area = " + str(area))print("square units")# ==========================================# 2. SOLVE INTERIOR POINTS## i = A - b/2 + 1# ==========================================elif choice == "2":area = positive_number("Area: ")b = positive_whole("Boundary points: ")i = (area -b / 2 +1)print()print("Using:")print("A = i + b/2 - 1")print()print("Rearranged:")print("i = A - b/2 + 1")print()if i < 0 or i != int(i):print("INVALID RESULT")print()print("Interior points")print("must be a whole")print("number.")print()print("Check your values.")else:i = int(i)print("ANSWER")print("Interior points =")print(str(i))# ==========================================# 3. SOLVE BOUNDARY POINTS## b = 2(A - i + 1)# ==========================================elif choice == "3":area = positive_number("Area: ")i = whole_number("Interior points: ")b = (2 *(area - i + 1))print()print("Using:")print("A = i + b/2 - 1")print()print("Rearranged:")print("b = 2(A-i+1)")print()if b <= 0 or b != int(b):print("INVALID RESULT")print()print("Boundary points")print("must be a positive")print("whole number.")print()print("Check your values.")else:b = int(b)print("ANSWER")print("Boundary points =")print(str(b))else:print("Invalid choice.")print()print("DuckieDai says: done!")# TI-Python imports the selected AppVar rather than# setting __name__ to main.main()
- Filename
PICKTHE.py- Size
- 5044 bytes
- SHA-256
1714c126a432524b92b65e5458d8a81699a3015d89d725f9ebc2295a23eca18a
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.
PICKTHEis 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.