Hidden WordScanner
Private scans · No account required

DuckieDai Ellipse Area

Solve an ellipse's area, semi-major axis, or semi-minor axis with labelled formulas and guarded positive inputs.

geometry · MIT License

Overview

Solve an ellipse's area, semi-major axis, or semi-minor axis with labelled formulas and guarded positive inputs.

  • Tested on a TI calculator
  • Downloaded 48 times
  • Version 1.0.0
  • 3675 bytes
  • Uses math

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; owner physically verified the supplied program.
  • a and b are the semi-axis lengths of one ellipse.
  • Inputs must be positive and below 1e100.
  • Inconsistent units produce an incorrect numerical result.

Try the DuckieDai calculator screen

This browser preview calculates area from the two semi-axes. The TI program also solves either missing semi-axis.

JavaScript is required for the optional browser simulation. Source viewing and downloading remain available without it.

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.

Learn the math

How the area of an ellipse works

The idea

An ellipse is a stretched circle. Where a circle has one radius, an ellipse has two: half its longest width and half its shortest width.

Replace r*r in the circle formula with those two half-widths and you have the area.

The formula

A = pi*a*b

A
area
a
semi-major axis: half the longest diameter
b
semi-minor axis: half the shortest diameter

Using the program

Worked example

An ellipse is 10 units long and 6 units wide, so a = 5 and b = 3. Choose 1 and enter 5 and 3.

A = pi x 5.0 x 3.0

The program shows Area = 47.12 square units (it prints more decimal places).

Tips and common mistakes

Where this comes up

Ellipses appear in the conic sections unit of algebra 2 and precalculus, and in physics and astronomy when orbits are described.

Exact reviewed bytes

Source code

Download .py

View source below, copy it when JavaScript is available, or download the exact .py bytes.

  1. """DuckieDai Ellipse Area for TI-84 Plus CE Python."""
  2. from math import pi
  3. def duckiedai_intro(program_name, wait=True):
  4. """Show the reusable DuckieDai program opening."""
  5. title = program_name[:16]
  6. empty = 16 - len(title)
  7. left = empty // 2
  8. right = empty - left
  9. print("+----------------------+")
  10. print("| " + " " * left + title + " " * right + " |")
  11. print("| |")
  12. print("| __ |")
  13. print("| ___(o )> quack! |")
  14. print("| \\ <_. ) |")
  15. print("| `---' |")
  16. print("| by DuckieDai |")
  17. print("+----------------------+")
  18. print("Loading...")
  19. if wait:
  20. input("Press enter to start ")
  21. print("\n" * 6)
  22. def positive_number(prompt):
  23. """Require a positive finite number."""
  24. while True:
  25. try:
  26. value = float(input(prompt))
  27. if value > 0 and value < 1e100:
  28. return value
  29. except ValueError:
  30. pass
  31. print("Enter a number above 0.")
  32. def show_answer(name, value, unit):
  33. print()
  34. print("ANSWER")
  35. print(name + " = " + str(value))
  36. print(unit)
  37. def main():
  38. duckiedai_intro("ELLIPSE AREA")
  39. print("AREA OF ELLIPSE")
  40. print()
  41. print("Formula:")
  42. print("A = pi*a*b")
  43. print()
  44. print("a = semi-major axis")
  45. print("b = semi-minor axis")
  46. print()
  47. print("What do you need?")
  48. print()
  49. print("1. Area")
  50. print("2. Semi-major axis")
  51. print("3. Semi-minor axis")
  52. print()
  53. choice = input("Choose 1-3: ")
  54. print()
  55. # ==========================================
  56. # 1. SOLVE AREA
  57. #
  58. # A = pi*a*b
  59. # ==========================================
  60. if choice == "1":
  61. a = positive_number(
  62. "Semi-major a: "
  63. )
  64. b = positive_number(
  65. "Semi-minor b: "
  66. )
  67. area = pi * a * b
  68. print()
  69. print("Using:")
  70. print("A = pi*a*b")
  71. print()
  72. print("A = pi x")
  73. print(str(a) + " x " + str(b))
  74. show_answer(
  75. "Area",
  76. area,
  77. "square units"
  78. )
  79. # ==========================================
  80. # 2. SOLVE SEMI-MAJOR AXIS
  81. #
  82. # a = A / (pi*b)
  83. # ==========================================
  84. elif choice == "2":
  85. area = positive_number(
  86. "Area: "
  87. )
  88. b = positive_number(
  89. "Semi-minor b: "
  90. )
  91. a = area / (pi * b)
  92. print()
  93. print("Using:")
  94. print("A = pi*a*b")
  95. print()
  96. print("Rearranged:")
  97. print("a = A/(pi*b)")
  98. show_answer(
  99. "a",
  100. a,
  101. "units"
  102. )
  103. # ==========================================
  104. # 3. SOLVE SEMI-MINOR AXIS
  105. #
  106. # b = A / (pi*a)
  107. # ==========================================
  108. elif choice == "3":
  109. area = positive_number(
  110. "Area: "
  111. )
  112. a = positive_number(
  113. "Semi-major a: "
  114. )
  115. b = area / (pi * a)
  116. print()
  117. print("Using:")
  118. print("A = pi*a*b")
  119. print()
  120. print("Rearranged:")
  121. print("b = A/(pi*a)")
  122. show_answer(
  123. "b",
  124. b,
  125. "units"
  126. )
  127. else:
  128. print("Invalid choice.")
  129. print()
  130. print("DuckieDai says: done!")
  131. # TI-Python imports the selected AppVar rather than
  132. # setting __name__ to main.
  133. main()
Filename
ELLIPSE.py
Size
3675 bytes
SHA-256
66732e0d1831cc0bcbac60aa47066db15d918bfc34dce3242f33afabb725c9fe

Usage

Inputs

  • Requested unknown: area, semi-major axis, or semi-minor axis
  • Two known positive values below 1e100

Outputs

  • Requested ellipse quantity with formula and labelled units

Units: Use one consistent length unit; area uses that unit squared.

Assumptions and limitations

Assumptions

  • a and b are the semi-axis lengths of one ellipse.

Constraints

  • Inputs must be positive and below 1e100.

Known failures

  • Inconsistent units produce an incorrect numerical 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 ellipse area program runs on the physical calculator.
Dependencies
math
Suggested calculator name
ELLIPSE — 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

Download the .py file, send it to your calculator with TI Connect CE as ELLIPSE or another name, then open the Python App and try the worked example on this page first.

Full installation and troubleshooting guide. Check your teacher's or exam's rules before using any program.

Version history

Did a DuckieDai program help with your homework? Every program here is free. If you would like to say thanks, you can leave a tip on Cash App ($duckiedai214) or read what tips pay for.

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, and so does a Yes or No answer about whether the program worked. Your browser notes that you answered; that note is never sent to the site. No entered values, source text, IP address, account, cookie, device identifier, or fingerprint is stored with these counts.