trigonometry · MIT License
Overview
Four angle tools in one program: find coterminal angles, change degrees to radians, change a multiple of pi to degrees, and name an angle's quadrant and type.
- Owner-tested on a TI calculator
- Version 1.0.0
- 2896 bytes
- Uses math
Tried it? Did this program work on your calculator?
Before you run it
- TI-84 Plus CE Python · No calculator OS or Python App version has been verified.
- TI Connect CE .py transfer to the Python App; the owner's transfer details were not recorded
- Angles are measured from the positive x-axis, counterclockwise for positive angles.
- For Angle/quad, the angle is first reduced to one turn, 0 up to 360 degrees, and the answer describes that angle.
- Numbers may be typed as decimals or fractions such as 1/3; inf and nan are asked for again.
Try the DuckieDai calculator screen
Follow the program's prompts and result flow before downloading.
TI-84 Plus CE Python · screen preview
Learn the math
How coterminal angles, radians, and quadrants work
The idea
An angle in standard position starts on the positive x-axis and turns, counterclockwise for a positive angle and clockwise for a negative one. Turning a full circle, 360 degrees or 2pi radians, lands you back where you began.
So angles that differ by whole turns end in the same place. They are called coterminal, and every angle has one between 0 and 360 degrees. Where an angle ends decides its quadrant, and that decides the signs of sine, cosine, and tangent.
The formula
coterminal angle = angle + 360k (k any whole number)
radians = degrees*pi/180
degrees = (multiple of pi)*180
360 or 2pi- one full turn, in degrees or radians
k- how many whole turns are added or taken away
Quadrant 1 to 4- the four regions between the axes, numbered counterclockwise from the top right
Using the program
- Choose 1 for coterminal angles, then give the angle in degrees, as a fraction of pi such as 3/4 for 3pi/4, or in radians. The program shows the coterminal angle from just above 0 up to one full turn, and the matching negative angle.
- Choose 2 to change degrees to radians. Whole-number degrees also get an EXACT answer as a fraction times pi.
- Choose 3 to change a multiple of pi to degrees: type 1/3 for pi/3.
- Choose 4 to find where an angle ends. The program names the quadrant and its direction, such as Up-left, or the axis it lies on, then says whether the angle is acute, right, obtuse, straight, or reflex.
- Numbers can be decimals or fractions such as 1/3.
Worked example
Find a positive and a negative angle coterminal with -30 degrees. Choose 1, then 1 for degrees, and enter -30.
-30 + 360 = 330, 330 - 360 = -30
The program shows Positive: 330.0 and Negative: -30.0.
For 17pi/6, choose 1, then 2, and type 17/6. Taking away one full turn, 12pi/6, leaves 5pi/6, so the program shows Positive: 5/6pi and Negative: -7/6pi.
Change 90 degrees to radians: choose 2 and enter 90. The program shows EXACT: 1/2 pi and DEC: 1.570796.
Where does 135 degrees end? Choose 4, then 1, and enter 135. The program shows Quadrant 2, Up-left, and Obtuse.
Tips and common mistakes
- Every angle has endless coterminal angles. The program gives the one in the first full turn and the negative one next to it; add or subtract 360 for more.
- A full turn counts as 360 degrees, or 2pi, as the positive angle, and -360 degrees, or -2pi, as the negative one.
- For Angle/quad, a negative or larger angle is first brought into 0 to 360 degrees, so -30 is described as 330: Quadrant 4 and reflex.
- Remember ASTC for the quadrants: All three trig functions are positive in Quadrant 1, Sine in 2, Tangent in 3, and Cosine in 4.
Where this comes up
Coterminal angles, radian measure, and quadrants open the trigonometry unit in precalculus and algebra 2, and they come back whenever the unit circle is used.
Exact reviewed bytes
Source code
# DUCKIEDAI TM - TRIG LITE# TI-84 CE PYTHONfrom math import pidef n(p):while 1:try:s=input(p)if '/' in s:a,b=s.split('/')v=float(a)/float(b)else:v=float(s)if v-v:raise ValueErrorreturn vexcept:print('Try again')def f(a,b):a=int(a);b=int(b)x=abs(a);y=abs(b)while y:x,y=y,x%yif x:a//=x;b//=xif b==1:return str(a)return str(a)+'/'+str(b)def pause():input("ENTER to continue")def intro():print('DUCKIEDAI(TM)')print('TRIG TOOLS')print(' __')print(' ___(o )> quack!')print(' \\ <_. )')print(" `---'")print('by DuckieDai')print('hiddenwordscanner.com')input('Press Enter ')print('\n'*7)def bye():print('DUCKIEDAI (TM)')print('hiddenwordscanner.com')input('ENTER to exit')def menu():while 1:print('\n'*8)print('DUCKIEDAI TM TRIG')print('1 Coterminal')print('2 Deg to rad')print('3 pi to deg')print('4 Angle/quad')print('0 Exit')k=input('Pick: ')if k=='0':breakif k=='1':print('1 Deg 2 Pi 3 Rad')z=input('Angle type: ')if z=='1':a=n('Degrees: ')v=a%360print('Positive:',v if v else 360)print('Negative:',v-360 if v else -360)elif z=='2':try:s=input('Pi fraction (a/b): ')if '/' in s:x,y=s.split('/')a=int(x);b=int(y)else:a=int(s);b=1if b==0:raise ValueErrorif b<0:a=-a;b=-bv=a%(2*b);w=v-2*bif v==0:v=2*bprint('Positive:',f(v,b)+'pi')print('Negative:',f(w,b)+'pi')except:print('Invalid fraction')elif z=='3':a=n('Radians: ')v=a%(2*pi)if abs(v)<1e-9 or abs(v-2*pi)<1e-9:v=0print('Positive:',round(v if v else 2*pi,6))print('Negative:',round(v-2*pi,6))else:print('Invalid type')elif k=='2':a=n('Degrees: ')if a==int(a):print('EXACT:',f(a,180),'pi')print('DEC:',round(a*pi/180,6))elif k=='3':print('Enter coefficient of pi')a=n('pi x: ')print('Degrees:',round(a*180,6))elif k=='4':print('1 Deg 2 Pi 3 Rad')z=input('Angle type: ')if z=='1':a=n('Degrees: ')%360elif z=='2':a=(n('Pi coefficient: ')*2)%4a=a*90elif z=='3':a=(n('Radians: ')%(2*pi))*180/pielse:print('Invalid type')pause()continueif abs(a-360)<1e-8:a=0if abs(a)<1e-8:print('+X axis')elif abs(a-90)<1e-8:print('+Y axis')elif abs(a-180)<1e-8:print('-X axis')elif abs(a-270)<1e-8:print('-Y axis')else:q=int(a//90)+1print('Quadrant',q)if q==1:print('Up-right')elif q==2:print('Up-left')elif q==3:print('Down-left')else:print('Down-right')if abs(a-90)<1e-8:print('Right')elif abs(a-180)<1e-8:print('Straight')elif abs(a)<1e-8:print('Zero/full')elif a<90:print('Acute')elif a<180:print('Obtuse')else:print('Reflex')else:print('Try 0-4')if k!='0':pause()intro()menu()bye()
- Filename
TRIGMAIN.py- Size
- 2896 bytes
- SHA-256
82f18c0baff941d55f24c7f51b184cbb074a62b44e431a4c389838c631b8ff79
Usage
Inputs
- A menu choice: 1 coterminal angles, 2 degrees to radians, 3 a multiple of pi to degrees, 4 quadrant and angle type
- An angle in degrees, as a fraction or multiple of pi, or in radians
Outputs
- A positive and a negative coterminal angle in the same form as the input
- Radians exactly in terms of pi and as a decimal, or degrees from a multiple of pi
- The quadrant or axis of an angle, and whether it is acute, right, obtuse, straight, or reflex
Units: Angles in degrees, multiples of pi, or radians.
Assumptions and limitations
Assumptions
- Angles are measured from the positive x-axis, counterclockwise for positive angles.
- For Angle/quad, the angle is first reduced to one turn, 0 up to 360 degrees, and the answer describes that angle.
Constraints
- Numbers may be typed as decimals or fractions such as 1/3; inf and nan are asked for again.
- A pi fraction for coterminal angles must be whole numbers, such as 3/4 for 3pi/4.
- Degrees to radians shows an exact answer in terms of pi only for whole-number degrees.
Known failures
- Coterminal angles in degrees are not rounded, so 1/3 shows every digit Python prints.
- Angles within about 0.00000001 degree of an axis are reported as on that axis.
Compatibility and review
- Review status
- Owner-tested on a TI calculator
- Tested on
- Owner reports personally running this program on a TI-84 Plus CE Python calculator; the test date, OS version, and Python App version were not recorded
- What happened
- Owner reported pass on the calculator before three fixes: the number prompt now asks again when inf or nan is typed, where the original stopped with an error, and a full turn now shows 2pi and 6.283185 as its negative coterminal angle in place of 0pi and 0.0. Every other step is unchanged; this exact file has not yet been rerun on a calculator.
- Dependencies
- math
- Suggested calculator name
TRIGMAIN— 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 TRIGMAIN or another name, then open the Python App and try the worked example on this page first. This release has no verified calculator OS or Python App version; treat transfer and execution as unverified until independently tested.
Full installation and troubleshooting guide. Check your teacher's or exam's rules before using any program.
Version history
- 1.0.0 — current version, published . Download this reviewed version
Related learning
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.