Hidden WordScanner
Private scans · No account required

DuckieDai Frustum Volume

Solve frustum volume, height, or either base area using the square-root frustum-volume formula.

Version 1.0.0 · Tested on a TI calculator

← 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 frustum volume, height, or either base area using the square-root frustum-volume formula.

Usage

Inputs

  • Requested unknown: volume, height, or one base area
  • Three known positive values

Outputs

  • Requested frustum quantity with formula and units

Units: Height uses length units, base areas use squared units, and volume uses cubed units.

Assumptions and limitations

Assumptions

  • A1 and A2 are positive parallel base areas of one frustum.

Constraints

  • All entered values must be positive and below 1e100.

Known failures

  • 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 frustum volume program runs on the physical calculator.
Dependencies
math
Suggested calculator name
FRUSTVOL — 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 frustum volume

This browser preview calculates volume from height and two base areas. The TI program also solves the inverse modes.

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

Download .py

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

  1. """DuckieDai Frustum Volume for TI-84 Plus CE Python."""
  2. from math import sqrt
  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 frustum_volume(h, a1, a2):
  38. """Calculate frustum volume."""
  39. return (
  40. h / 3 *
  41. (a1 + a2 + sqrt(a1 * a2))
  42. )
  43. def solve_missing_area(volume, height, known_area):
  44. """Solve one base area when the other is known."""
  45. k = 3 * volume / height
  46. inside = 4 * k - 3 * known_area
  47. if inside < 0:
  48. return None
  49. root_area = (
  50. -sqrt(known_area) +
  51. sqrt(inside)
  52. ) / 2
  53. if root_area < 0:
  54. return None
  55. return root_area ** 2
  56. def main():
  57. duckiedai_intro("FRUSTUM VOLUME")
  58. print("FRUSTUM VOLUME")
  59. print()
  60. print("V = h/3 *")
  61. print("(A1+A2+sqrt(A1*A2))")
  62. print()
  63. print("A1 = base area 1")
  64. print("A2 = base area 2")
  65. print("h = height")
  66. print()
  67. print("What do you need?")
  68. print()
  69. print("1. Volume")
  70. print("2. Height")
  71. print("3. Base area A1")
  72. print("4. Base area A2")
  73. print()
  74. choice = input("Choose 1-4: ")
  75. print()
  76. # ==========================================
  77. # 1. SOLVE VOLUME
  78. #
  79. # V = h/3(A1+A2+sqrt(A1*A2))
  80. # ==========================================
  81. if choice == "1":
  82. h = positive_number(
  83. "Height: "
  84. )
  85. a1 = positive_number(
  86. "Base area A1: "
  87. )
  88. a2 = positive_number(
  89. "Base area A2: "
  90. )
  91. volume = frustum_volume(
  92. h, a1, a2
  93. )
  94. print()
  95. print("Using:")
  96. print("V = h/3 *")
  97. print("(A1+A2+sqrt(A1*A2))")
  98. show_answer(
  99. "Volume",
  100. volume,
  101. "cubic units"
  102. )
  103. # ==========================================
  104. # 2. SOLVE HEIGHT
  105. #
  106. # h = 3V /
  107. # (A1+A2+sqrt(A1*A2))
  108. # ==========================================
  109. elif choice == "2":
  110. volume = positive_number(
  111. "Volume: "
  112. )
  113. a1 = positive_number(
  114. "Base area A1: "
  115. )
  116. a2 = positive_number(
  117. "Base area A2: "
  118. )
  119. denominator = (
  120. a1 +
  121. a2 +
  122. sqrt(a1 * a2)
  123. )
  124. h = (
  125. 3 * volume /
  126. denominator
  127. )
  128. print()
  129. print("Using:")
  130. print("V = h/3 *")
  131. print("(A1+A2+sqrt(A1*A2))")
  132. print()
  133. print("Rearranged:")
  134. print("h = 3V /")
  135. print("(A1+A2+sqrt(A1*A2))")
  136. show_answer(
  137. "Height",
  138. h,
  139. "units"
  140. )
  141. # ==========================================
  142. # 3. SOLVE A1
  143. # ==========================================
  144. elif choice == "3":
  145. volume = positive_number(
  146. "Volume: "
  147. )
  148. h = positive_number(
  149. "Height: "
  150. )
  151. a2 = positive_number(
  152. "Known area A2: "
  153. )
  154. a1 = solve_missing_area(
  155. volume,
  156. h,
  157. a2
  158. )
  159. if a1 is None:
  160. print()
  161. print("NO VALID RESULT")
  162. print()
  163. print("Check volume,")
  164. print("height, and area.")
  165. else:
  166. print()
  167. print("Using:")
  168. print("V = h/3 *")
  169. print("(A1+A2+sqrt(A1*A2))")
  170. print()
  171. print("Solved for A1.")
  172. show_answer(
  173. "A1",
  174. a1,
  175. "square units"
  176. )
  177. # ==========================================
  178. # 4. SOLVE A2
  179. # ==========================================
  180. elif choice == "4":
  181. volume = positive_number(
  182. "Volume: "
  183. )
  184. h = positive_number(
  185. "Height: "
  186. )
  187. a1 = positive_number(
  188. "Known area A1: "
  189. )
  190. a2 = solve_missing_area(
  191. volume,
  192. h,
  193. a1
  194. )
  195. if a2 is None:
  196. print()
  197. print("NO VALID RESULT")
  198. print()
  199. print("Check volume,")
  200. print("height, and area.")
  201. else:
  202. print()
  203. print("Using:")
  204. print("V = h/3 *")
  205. print("(A1+A2+sqrt(A1*A2))")
  206. print()
  207. print("Solved for A2.")
  208. show_answer(
  209. "A2",
  210. a2,
  211. "square units"
  212. )
  213. else:
  214. print("Invalid choice.")
  215. print()
  216. print("DuckieDai says: done!")
  217. # TI-Python imports the selected AppVar rather than
  218. # setting __name__ to main.
  219. main()
Filename
FRUSTVOL.py
Size
5989 bytes
SHA-256
843d2b627eedddda839b21978ad6b94af9db20adee8b489f96886e5c4adc8f4e

Transfer and launch

  1. Confirm that your calculator is the Python-capable model named above. Check that its OS and Python App versions match the reviewed record.
  2. Download the .py source above and verify its SHA-256 digest if your computer provides that option.
  3. Use TI Connect CE to send the Python file to a compatible calculator. FRUSTVOL is a suggested name; you may choose another valid, unique calculator name.
  4. 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

Any source change requires a new immutable version and digest. Historical downloads remain available only while their review records remain valid.