← 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
Calculate a triangle's area, perimeter, and semiperimeter from three side lengths.
Usage
Inputs
- Three positive side lengths
Outputs
- Triangle area, perimeter, and semiperimeter
Units: Use one consistent length unit; area uses that unit squared.
Assumptions and limitations
Assumptions
- The three values form a nondegenerate triangle.
Constraints
- Each side must be positive and the triangle inequality must hold.
Known failures
- Invalid side sets are rejected.
- Inconsistent units produce an incorrect result.
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 Heron's formula program runs on the physical calculator.
- Dependencies
- math
- Suggested calculator name
HERON— 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 Heron's formula
This browser preview calculates a valid triangle's area from its three sides.
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 Heron's Formula for TI-84 Plus CE Python."""from math import sqrtdef 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 positive_number(prompt):"""Require a number greater than zero."""while True:try:value = float(input(prompt))if value > 0 and value < 1e100:return valueexcept ValueError:passprint("Enter a number above 0.")def valid_triangle(a, b, c):"""Check the triangle inequality."""return (a + b > c anda + c > b andb + c > a)def heron_area(a, b, c):"""Calculate triangle area using Heron's Formula."""s = (a + b + c) / 2area = sqrt(s *(s - a) *(s - b) *(s - c))return s, areadef main():duckiedai_intro("HERONS FORMULA")print("HERON'S FORMULA")print("TRIANGLE AREA")print()print("A = sqrt(")print("s(s-a)(s-b)(s-c))")print()print("s = (a+b+c)/2")print()a = positive_number("Side a: ")b = positive_number("Side b: ")c = positive_number("Side c: ")print()if not valid_triangle(a, b, c):print("INVALID TRIANGLE")print()print("These side lengths")print("cannot form a")print("triangle.")else:s, area = heron_area(a, b, c)perimeter = a + b + cprint("Using:")print("s = (a+b+c)/2")print()print("s = " + str(s))print()print("A = sqrt(")print("s(s-a)(s-b)(s-c))")print()print("RESULTS")print()print("Perimeter =")print(str(perimeter))print()print("Semiperimeter =")print(str(s))print()print("Area =")print(str(area))print("square units")print()print("DuckieDai says: done!")# TI-Python imports the selected AppVar rather than# setting __name__ to main.main()
- Filename
HERON.py- Size
- 2772 bytes
- SHA-256
f3100020895192b51d053c34e245d65eb4b1f606ff63c263daecc839a9ddffc3
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.
HERONis 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.