Hidden WordScanner
Private scans · No account required

DuckieDai Arc and Sector

Solve arc length, sector area, radius, or angle from the radian forms of the arc and sector formulas.

geometry · MIT License

Overview

Solve arc length, sector area, radius, or angle from the radian forms of the arc and sector formulas.

  • Tested on a TI calculator
  • Downloaded 69 times
  • Version 1.0.0
  • 6247 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.
  • The angle is measured in radians.
  • Radius and divisor angles must be positive; arc length and sector area may be zero.
  • Entering degrees instead of radians produces an incorrect result.

Try the DuckieDai calculator screen

This browser preview calculates arc length and sector area from radius and radians. The TI program also solves the inverse modes.

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 arc length and sector area work

The idea

An arc is a piece of a circle's edge and a sector is the pie slice beneath it. Both are simple fractions of the whole circle, and the formulas are shortest when the angle is measured in radians.

The formula

s = r*theta

A = 0.5*r^2*theta

s
arc length
A
sector area
r
radius
theta
central angle in radians

Using the program

Worked example

A circle of radius 4 has a central angle of 1.5 radians. Choose 1 and enter 4 and 1.5.

s = 4.0 x 1.5

The program shows s = 6.0 units.

Tips and common mistakes

Where this comes up

Arc length and sector area appear in the circles unit of geometry and in precalculus when radians are introduced. Physics uses the same relation to connect angle turned with distance traveled.

Exact reviewed bytes

Source code

Download .py

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

  1. """DuckieDai Arc & Sector 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 nonnegative_number(prompt):
  33. """Allow zero or positive finite numbers."""
  34. while True:
  35. try:
  36. value = float(input(prompt))
  37. if value >= 0 and value < 1e100:
  38. return value
  39. except ValueError:
  40. pass
  41. print("Enter 0 or greater.")
  42. def show_answer(name, value, unit):
  43. print()
  44. print("ANSWER")
  45. print(name + " = " + str(value))
  46. print(unit)
  47. def main():
  48. duckiedai_intro("ARC & SECTOR")
  49. print("ARC & SECTOR")
  50. print()
  51. print("s = r*theta")
  52. print("A = 0.5*r^2*theta")
  53. print()
  54. print("IMPORTANT:")
  55. print("theta is RADIANS")
  56. print()
  57. print("What do you need?")
  58. print()
  59. print("1. Arc length")
  60. print("2. Sector area")
  61. print("3. Radius from arc")
  62. print("4. Radius from area")
  63. print("5. Angle from arc")
  64. print("6. Angle from area")
  65. print()
  66. choice = input("Choose 1-6: ")
  67. print()
  68. # ==========================================
  69. # 1. ARC LENGTH
  70. #
  71. # s = r*theta
  72. # ==========================================
  73. if choice == "1":
  74. radius = positive_number(
  75. "Radius: "
  76. )
  77. theta = nonnegative_number(
  78. "Angle (radians): "
  79. )
  80. arc = radius * theta
  81. print()
  82. print("Using:")
  83. print("s = r*theta")
  84. print()
  85. print("s = " + str(radius))
  86. print("x " + str(theta))
  87. show_answer(
  88. "s",
  89. arc,
  90. "units"
  91. )
  92. # ==========================================
  93. # 2. SECTOR AREA
  94. #
  95. # A = 0.5*r^2*theta
  96. # ==========================================
  97. elif choice == "2":
  98. radius = positive_number(
  99. "Radius: "
  100. )
  101. theta = nonnegative_number(
  102. "Angle (radians): "
  103. )
  104. area = (
  105. 0.5 *
  106. radius ** 2 *
  107. theta
  108. )
  109. print()
  110. print("Using:")
  111. print("A = 0.5*r^2*theta")
  112. print()
  113. print("A = 0.5 x")
  114. print(str(radius) + "^2")
  115. print("x " + str(theta))
  116. show_answer(
  117. "A",
  118. area,
  119. "square units"
  120. )
  121. # ==========================================
  122. # 3. RADIUS FROM ARC LENGTH
  123. #
  124. # r = s/theta
  125. # ==========================================
  126. elif choice == "3":
  127. arc = nonnegative_number(
  128. "Arc length: "
  129. )
  130. theta = positive_number(
  131. "Angle (radians): "
  132. )
  133. radius = arc / theta
  134. print()
  135. print("Using:")
  136. print("s = r*theta")
  137. print()
  138. print("Rearranged:")
  139. print("r = s/theta")
  140. show_answer(
  141. "r",
  142. radius,
  143. "units"
  144. )
  145. # ==========================================
  146. # 4. RADIUS FROM SECTOR AREA
  147. #
  148. # r = sqrt(2A/theta)
  149. # ==========================================
  150. elif choice == "4":
  151. area = nonnegative_number(
  152. "Sector area: "
  153. )
  154. theta = positive_number(
  155. "Angle (radians): "
  156. )
  157. radius = sqrt(
  158. (2 * area) /
  159. theta
  160. )
  161. print()
  162. print("Using:")
  163. print("A = 0.5*r^2*theta")
  164. print()
  165. print("Rearranged:")
  166. print("r = sqrt(2A/theta)")
  167. show_answer(
  168. "r",
  169. radius,
  170. "units"
  171. )
  172. # ==========================================
  173. # 5. ANGLE FROM ARC LENGTH
  174. #
  175. # theta = s/r
  176. # ==========================================
  177. elif choice == "5":
  178. arc = nonnegative_number(
  179. "Arc length: "
  180. )
  181. radius = positive_number(
  182. "Radius: "
  183. )
  184. theta = arc / radius
  185. print()
  186. print("Using:")
  187. print("s = r*theta")
  188. print()
  189. print("Rearranged:")
  190. print("theta = s/r")
  191. show_answer(
  192. "theta",
  193. theta,
  194. "radians"
  195. )
  196. # ==========================================
  197. # 6. ANGLE FROM SECTOR AREA
  198. #
  199. # theta = 2A/r^2
  200. # ==========================================
  201. elif choice == "6":
  202. area = nonnegative_number(
  203. "Sector area: "
  204. )
  205. radius = positive_number(
  206. "Radius: "
  207. )
  208. theta = (
  209. 2 * area /
  210. (radius ** 2)
  211. )
  212. print()
  213. print("Using:")
  214. print("A = 0.5*r^2*theta")
  215. print()
  216. print("Rearranged:")
  217. print("theta = 2A/r^2")
  218. show_answer(
  219. "theta",
  220. theta,
  221. "radians"
  222. )
  223. else:
  224. print("Invalid choice.")
  225. print()
  226. print("DuckieDai says: done!")
  227. # TI-Python imports the selected AppVar rather than
  228. # setting __name__ to main.
  229. main()
Filename
ARCSECTR.py
Size
6247 bytes
SHA-256
5f9e97ec66f6e40785ab7d95e731ccf20532171354adb2dd98ca18a156ade831

Usage

Inputs

  • Requested unknown and known radius, arc length, sector area, or angle
  • Angle values are radians

Outputs

  • Requested arc or sector quantity with formula and units

Units: Radius and arc length use one length unit; sector area uses that unit squared; angles use radians.

Assumptions and limitations

Assumptions

  • The angle is measured in radians.

Constraints

  • Radius and divisor angles must be positive; arc length and sector area may be zero.

Known failures

  • Entering degrees instead of radians produces 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 arc and sector program runs on the physical calculator.
Dependencies
math
Suggested calculator name
ARCSECTR — 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 ARCSECTR 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.