Showing posts with label rounding. Show all posts
Showing posts with label rounding. Show all posts

Friday, March 14, 2025

Casio fx-6500P Program Library 2025

Casio fx-6500P Program Library 2025


Last birthday, I reviewed the rare classic, the Casio fx-6500G:

https://edspi31415.blogspot.com/2024/03/spotlight-casio-fx-6500g.html



Casio fx-6500G




Parabola Area and Maximum Point: Program P1: Steps 114


Area Under a Parabola set up by the equation:


y = -((x – a)*(x – b)) = -x^2 + p*x – q

p = a + b

q = a * b


Cls

“-((X-A)×(X-B))”

“A”? →A

“B”? → B

A+B → P

AB → Q

-B^3 ÷ 3 + B² P ÷ 2 – Q B + A^3 ÷ 3 - A² P ÷ 2 + Q A → R

“AREA:”

R ◢

“MAX PT:”

P ÷ 2 →X ◢

-((X-A)×(X-B)) → Y



The caret symbol ^ stands for [x^y].


Example:

y = -((x + 4) * (x – 2)) = -x^2 – 2*x + 8

A = -4, B = 2

Area: 36

Maximum Point: (-1, 9)



Circular Sector: Arc Length and Sector Area: Program: P2: Steps: 59


“RADIUS”? →R

“ANG(°)”? → T

RTπ÷180 →L

RL÷2 →A

“ARC LENGTH:”

L ◢

“AREA:”

A


The degree character is generated by the [° ‘ “] key.


Example:


R = 10.5, T (angle) = 120°

Results: Arc length = 21.99114858, Area = 115.45353



Integer Division: Program: P3: Steps: 51


“INT÷”

“X>0”? →X

“M>0”? →M

Int(X÷M)→Q

X-M×Q→R

Q ◢

“REM”

R


Examples:


43 Int÷ 11 = 3 Rem 10


7263 Int÷ 1849 = 3 Rem 1716


Hint: To find out the number of steps in a single program? Simply scroll down the last character and hold down the [ MDisp ] key. Kind of neat because this works outside of programming mode. I think this key was available on most Casio graphing calculators well into the fx-7700G (single G) and fx-9700Gα (E,M,H) series in mid 1990’s.



95% Population Proportion: Program P4: Steps: 96


X successes out of population N


“95 PRCT PROP”

“X”? → X

“N”? → N

X ÷ N → P

√(P(1-P))→ M

1.959963984 M ÷ √N → H

P – H → L

L + 2H → H

“LOW:”

L ◢

“HIGH:”

H


Example:


X = 850, N = 1176

Interval:

LOW: 0.6972058859

HIGH: 0.7483723454


Interval:


Source: HP 21S Stat/Math Calculator: Owner’s Manual. Hewlett Packard. 3rd Edition. June 1990.



Power Generated by a Wind Turbine: Program P5: Steps: 82


“WIND PWR”

“RADIUS (M)”? →R

“SPEED (M÷S)”? → V

“DENSITY”? →P

π × R² × P × V^3 ÷ 2 → W

“POWER:”

W


Example:


R = 8.18 m, V = 4.48 m/s, P = 1.2 kg/m³

Result: 11340.74989 W


Source: Sharp Electronics Corporation Conquering The Sciences: Applications for the SHARP Scientific Calculator EL-506A Sharp Corporation. Osaka, Japan. 1986. pp.75-77



Round to Nearest Integer (display only): Program P6: Steps: 11


?→N

Fix 0

Rnd

Norm


Examples:

N = 19.273 → 19

N = 44.8273 → 45

N = -2.82 → -3


That’s it. I wish you all a wonderful day. Thank you,


Eddie


All original content copyright, © 2011-2025. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Saturday, February 4, 2023

Casio fx-9750GIII: Effects of Rounding

 Casio fx-9750GIII:  Effects of Rounding



How Accurate?


The program ROUNDS compare true results against the true results in one of five calculations:


1.  A × B × C

2.  A × B ÷ C

3.  √(A^2 + B^2 - C^2)

4.  A ÷ B ÷ C

5.  (A + 1 ÷ B)^C


The rounded result is calculated after rounding after each step.


For example:  A × B × C


True result:  

T = A × B × C


Rounded Result:

R = round(A × B)

R = round(R × C)


The absolute error percentage is calculated.   



Casio fx-9750GIII Program:  ROUNDS


"2022-11-23 EWS"

"EFFECTS OF ROUNDING"

"# OF PLACES"?→N

"A"?→A

"B"?→B

"C"?→C

Menu "SELECT OPERATION",

"A×B×C",A

"A×B÷C",B

"√(A^2 + B^2 - C^2)",C

"A÷B÷C",D

"(A+1÷B)^C",E

Lbl A

RndFix(A×B,N)→R

RndFix(R×C,N)→R

A×B×C→T

Goto 1

Lbl B

RndFix(A×B,N)→R

RndFix(R÷C,N)→R

A×B÷C→T

Goto 1

Lbl C

RndFix(A²+B²,N)→R

RndFix(√(R-C²),N)→R

√(A²+B²- C²)→T

Goto 1

Lbl D

RndFix(A÷B,N)→R

RndFix(R÷C,N)→R

A÷B÷C→T

Goto 1

Lbl E

RndFix(A+1÷B,N)→R

RndFix(R^C,N)→R

(A+1÷B)^C→T

Goto 1

Lbl 1

RndFix(100×Abs (R-T)÷T,5)→E

ClrText

Locate 1,3,"ROUNDED:"

Locate 9,3,R

Locate 1,4,"ACTUAL:"

Locate 9,4,T

Locate 1,5,"ERROR%:"

Locate 9,5



Example:


Let A = 13.946, B = 11.9765, C = π^3/4

Round to 2 decimal places (N = 2)


1.  A × B × C

Rounded:  1294.67

Actual:  1294.700174

Error:  2.33*10^-3 %


2.  A × B ÷ C

Rounded: 21.55

Actual:  21.54715585

Error:  0.0132%


3.  √(A^2 + B^2 - C^2)

Rounded: 16.67

Actual:  16.66855254

Error:  8.68*10^-3 %


4.  A ÷ B ÷ C

Rounded: 0.15

Actual: 0.1502208155

Error: 0.14699%


5.  (A + 1 ÷ B)^C

Rounded: 778927217

Actual:  778710708.2

Error:  0.0278%



Enjoy,  


Eddie 


All original content copyright, © 2011-2023.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Sunday, February 13, 2022

TI-84 Plus CE Python (and TI Basic): Rounding vs. Truncating

TI-84 Plus CE Python (and TI Basic):  Rounding vs. Truncating 


Rounding vs Truncating:  Introduction


The program ROUNDING and the Python script rounding.py takes two numbers and estimates one of four arithmetic operations (+, - , ×, ÷).   


Rounding:  rounds a real number to the nearest integer.  The traditional 5/4 rules are applied.  In the case of the integers:  for all numbers with fractional parts of 0.5 and above (to 0.9999...), the integer is rounded up.   


Truncating:  the fractional part of the number is dropped.  


For example:


round(14.2) -> 14

round(14.5) -> 15

round(14.7) -> 15


trunc(14.2) -> 14

trunc(14.5) -> 14

trunc(14.7) -> 14


This results are shown in text form (Python program) or stored in a matrix:


[ [ x and y are rounded individually before the arithmetic operation, percent error ]

[ x and y are truncated individually before the arithmetic operation, percent error ]

[ result is rounded after the arithmetic operation, percent error ]

[ result is truncated after the arithmetic operation, percent error ] ]


The rounding percent program allows the user to compare rounding methods.


TI-84 Plus CE Python:  Python script rounding.py


from math import *

#  rounding comparison

#  2021-12-21 EWS


# rounding

def rd(x):

  return int(x+0.5)


# truncate

def tr(x):

  return int(x)


# percent change

def pc(x,y):

  return (y-x)/x*100


print("integer rounding arithmetic")

pirnt("x [+,-,*,/] y")

x=eval(input("x>0, x? "))

y=eval(input("y>0, y?  "))

print("1 + 2 - 3 * 4 / ")

op=float(input("Operation? "))


# test, force error

if op<1 or op>4:

  print("not a valid operation")

  1/0


# operations

if op==1:

  a=rd(x)+rd(y)

  b=tr(x)+tr(y)

  c=rd(x+y)

  d=tr(x+y)

  z=x+y


if op==2:

  a=rd(x)-rd(y)

  b=tr(x)-tr(y)

  c=rd(x-y)

  d=tr(x-y)

  z=x-y


if op==3:

  a=rd(x)*rd(y)

  b=tr(x)*tr(y)

  c=rd(x*y)

  d=tr(x*y)

  z=x*y


if op==4:

  a=rd(x)/rd(y)

  b=tr(x)/tr(y)

  c=rd(x/y)

  d=tr(x/y)

  z=x/y


print("results")


print("rounding individual")

print(str(a)+" ,"+str(pc(z,a))+"%")


print("truncate individual")

print(str(b)+" ,"+str(pc(z,b))+"%")


print("rounding result")

print(str(c)+" ,"+str(pc(z,c))+"%")


print("truncate result")

print(str(d)+" ,"+str(pc(z,d))+"%")


TI-84 Plus CE Python (TI-Basic):  ROUNDING


"2021-12-21 EWS"

Disp "INTEGER ROUNDING ARITHMETIC","X [+,-,*,/] Y"

Input "X>0, X? ",X

Input "Y>0, Y? ",Y

iPart(X+.5)→N

iPart(X)→S

iPart(Y+.5)→J

iPart(Y)→T

Menu("OPERATION?","X+Y",1,"X-Y",2,"X*Y",3,"X/Y",4)

Lbl 1

N+J→A

S+T→B

X+Y→Z

Goto 5

Lbl 2

N-J→A

S-T→B

X-Y→Z

Goto 5

Lbl 3

N*J→A

S*T→B

X*Y→Z

Goto 5

Lbl 4

N/J→A

S/T→B

X/Y→Z

Goto 5

Lbl 5

iPart(Z+.5)→C

iPart(Z)→D

ClrHome

Disp "ROUND IND","TRUNC INC","ROUND RESULT","TURNC RESULT"

Wait 0.5

Pause [[A,(A-Z)/Z*100][B,(B-Z)/Z*100][C,(C-Z)/Z*100][D,(D-Z)/Z*100]


Examples


17.36+56.19

Rounding Individual:  73, -0.7477906186%

Truncate Individual:  73, -0.7477906186%

Rounding Result:  74, 0.611828688%

Truncate Result: 73, -0.7477906186%


82.8 - 17.9

Rounding Individual:  65, 0.1540832049%

Truncate Individual:  65, 0.1540832049%

Rounding Result:  65, 0.1540832049%

Truncate Result: 64, -1.386748844%


9.28 * 10.26

Rounding Individual:  90, -5.474894132%

Truncate Individual:  90, -5.474894132%

Rounding Result:  95, -0.2234993614%

Truncate Result: 95, -0.2234993614%


46.5 / 1.5

Rounding Individual:  23.5, -24.19354839%

Truncate Individual:  46, 48.38709677%

Rounding Result:  31, 0%

Truncate Result: 31, 0%


It just goes to show, rounding or truncating numbers before calculation may give results that aren't as accurate as one would like.  The following paper, "Rounding versus truncation estimates in difference calculations" by Leonard Van Wyk (see source) argues that sometime truncation is more accurate than rounding in subtraction problems.   


Source


Van Wyk, Leonard   "Rounding versus truncation estimates in difference calculations"  The Mathematical Gazette, Volume 103, Issue 557, July 2019.  pp 285 -292



Eddie 


All original content copyright, © 2011-2022.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Saturday, October 9, 2021

Swiss Micros DM41X and HP Prime: Rounding Numbers to One Significant Digit

Swiss Micros DM41X and HP Prime:  Rounding Numbers to One Significant Digit





Introduction


This blog entry deals with rounding numbers to one significant digit, that is the first non-zero numbers.  The general 5/4 rounding rules are used:  round up if you are next digit is 5 or more.  


Examples:  


72.28 rounds to 70


78.28 rounds to 80


0.0283 rounds to 0.03


Rob Eastaway, author of Maths On the Back of an Envelope (see source below), introduces the concept of Zequals.  Zequals is the practice of rounding numbers to one significant digit, with it's symbol similar to the symbol for the constellation Aquarius the Water Bearer ( ♒ ).  The aim for rounding numbers to one significant digit is to aid in estimating arithmetic operations and make mental mathematics easier.   


Is it always spot on?


The program RONE (Round to ONE Significant Digit) rounds positive, non-zero numbers to one significant digit.   An algorithm to do so may look like this:


Number:  x

a = log(x)

If a≥0, then a=int(a)

If a<0, then a=int(a)-1

n = int(x / (10^a) + 1/2) * 10^a


We can also use:

n = round(x / (10^a),0) * 10^a



I have included the HP Prime PPL code for RONE.  RONEARITH for the HP Prime compares the actual versus rounded calculation for the four arithmetic functions.





Swiss Micros DM41X Program:  RONE


01 LBL^T ZONE

02 CF 01

03 ENTER

04 LOG

05 X<0?

06 SF 01

07 INT

08 FS? 01

09 - 

10 FS? 01

11 -

12 10^X

13 /

14 LASTX

15 X<>Y

16 2

17 1/X

18 + 

19 INT

20 *

21 CF 01

22 RTN

23 END


Examples:  


52.4564 XEQ RONE returns 50.0000


0.06834 XEQ RONE returns 0.0700

 

HP Prime Program:  RONE


EXPORT RONE(n)

BEGIN

// Round to one significant digit

LOCAL a;

a:=LOG(n);

IF a<0 THEN

a:=IP(a)-1;

ELSE

a:=IP(a);

END;

RETURN ROUND(n/ALOG(a),0)*ALOG(a);

END;


HP Prime Program:  RONEARITH


EXPORT RONEARITH()

BEGIN

// 2021-07-26 EWS

// Input form

LOCAL c,x,y,r,t,l;

l:={"+","-",CHAR(#D7h),CHAR(#F7h)};

INPUT({x,y,{c,l}},

"1 Sig Digit Arithmetic",

{"x: ","y: ","OP: "},

{"x>0","y>0","Arithmetic Operation"});


 PRINT();


IF c==1 THEN

PRINT(STRING(x)+"+"+STRING(y));

r:=ZR(x)+ZR(y);

t:=x+y;

END;


IF c==2 THEN

PRINT(STRING(x)+"-"+STRING(y));

r:=ZR(x)-ZR(y);

t:=x-y;

END;


IF c==3 THEN

PRINT(STRING(x)+CHAR(#D7h)+STRING(y));

r:=ZR(x)*ZR(y);

t:=x*y;

END;


IF c==4 THEN

PRINT(STRING(x)+CHAR(#F7h)+STRING(y));

r:=ZR(x)/ZR(y);

t:=x/y;

END;  


PRINT("Estimate: "+STRING(r));

PRINT("Actual: "+STRING(t));    

   

END;


ZR(n)

BEGIN

// Round to one significant digit

LOCAL a;

a:=LOG(n);

IF a<0 THEN

a:=IP(a)-1;

ELSE

a:=IP(a);

END;

RETURN ROUND(n/ALOG(a),0)*ALOG(a);

END;



Source:


Eastaway, Rob.   Maths On the Back of an Envelope  HarperCollins Publishers:  Dublin, Ireland  3rd Ed.  2021.  ISBN 978-0-00-844449-5


Eddie


All original content copyright, © 2011-2021.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Saturday, August 21, 2021

TI-95 ProCalc: Approximate Derivative and Bisection Method

TI-95 ProCalc: Approximate Derivative and Bisection Method


Introduction:  The Label FX and Flags to set Radians Mode

The two programs presented today will use a subroutine with the label FX.  FX is going to be where you store your function.  I have designated the variables such that X can be used as storing and recall in the subroutine.   To edit FX:

In run mode (out of LEARN):  [ 2nd ] [ 2 ] (GTL) FX, [ LEARN ] [ F2 ] (PC)

The subroutine FX must end with = RTN.  

Radians mode can be set during programming with the following flag commands: RF 34 SF 33.

FYI, Degrees Mode:  RF 34 RF 33

And Gradians Mode:  RF 33 SF 34

Approximate Derivative

This program calculates f'(x), rounds, and displays the answer to five decimal places.  

f'(x) ≈ ( f(x + h) - f(x - h) ) / ( 2 * h ),  h is set to 10^-5

FIX 9 resets the TI-95 ProCalc to floating (all/standard) mode.

TI-95 ProCalc File DRV
Size:  varies

RF 34 SF 33 1 EE 5 +/- STO H

CLR 'X?' BRK STO A 

+ RCL H = SBL FX STO D

RCL A - RCL H = SBL FX ST- D

RCL D / ( 2 * RCL H ) = 

FIX 5 RND FIX 9 STO D HLT

LBL FX   [insert f(x) here, do not store values to A or H] = RTN

Examples

f(x) = x * sin x 
FX:  STO X * SIN = RTN
f'( π/5 ) returns 1.09611 
f'( 1.6*π ) returns 0.60223

f(x) = 3 * e^x
FX:  INV LN * 3 = RTN
f'( 1 ) returns 8.15485
f'( -1.215 ) returns 0.89013

Bisection Method

The bisection method finds a root for the equation f(x) = 0.  An advantage to the bisection method is that there is no requirement to calculate the derivative.  However, two initial guesses a and b are required such that f(a) * f(b) < 0, and the calculation process can be lengthy.

I set the tolerance to 10^-10.   

Note:  I will need a variable to store the 0 value.  IF tests on the TI-95 ProCalc can not compare to numeric values directly.   I use the variable Z to store 0.

TI-95 ProCalc File BIS
Size:  varies

'BISECTION F(X)=0' PAU

CLR 'A?' BRK STO A

CLR 'B?' BRK STO B

10 +/- INV LOG STO T

0 STO Z

LBL A0 ( RCL A + RCL B ) / 2 = STO C

SBL FX STO F ABS IF <T GTL BO

RCL B SBL FX * RCL F = IF >Z GTL A1

RCL C STO A GTL A0

LBL A1 RCL C STO B GTL A0

LBL B0 CLR 'SOL=' COL 16 MRG C HLT

LBL FX  [insert f(x) here, do not store values to A, B, C, T, or Z] = RTN

Examples

3*x - e^x = 0
FX:  STO X * 3 - RCL X INV LN = RTN
Interval:  [1, 2] (A = 1, B = 2)
Result: 1.512134552

x - 2^(-x) = 0
FX:  STO X - 2 y^x RCL X +/- = RTN
Interval:  [0, 1]  (A = 0, B = 1)
Result:  0.6411857446

Source:
Byju's Classes  "Bisection Method - Definition, Procedure, and Example"  https://byjus.com/maths/bisection-method/  Retrieved June 5, 2021

Commas added to the results for readability.  

Eddie

All original content copyright, © 2011-2021.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 

Sunday, October 27, 2019

HP 12C and HP 41C/DM41L: Rounding Numbers

HP 12C and HP 41C/DM41L:  Rounding Numbers

Introduction

The following program rounds positive numbers to the desired decimal amount of places.  For example,  √3 rounded to 3 places is 1.732.  e^2 rounded to 2 places is 7.39. 

Set up your stack like this:
Y:  number
X: number of decimal places

HP 12C Program: Rounding

Step;  Code;   Key
01;  1;  1
02;  0;  0
03;  34;  x<>y
04;  21;  y^x
05;  36;  ENTER
06;  33;  R↓
07;  20;  *
08;  36;  ENTER
09;  43,24;  FRAC
10;  40;  +
11;  43, 25;  ITNG
12;  33;  R↓
13;  33;  R↓
14;  33;  R↓
15;  10;  ÷
16;  43,33,00;  GTO 00

HP 41C Program:  Rounding

01  LBL^T ROUND
02  10↑X
03  STO T
04 *
05 ENTER↑
06 FRC
07 +
08 INT
09 R↑
10 /
11 RTN
12 END

Examples:

Round √3 rounded to 3 places

Y:  3, sqrt   (√3)
X:  3

Result:  1.732

Round e^2 rounded to 2 places. is 7.39. 

Y: 2,  e^x  (e^2)
X:  2

Result:  7.39

Eddie

All original content copyright, © 2011-2019.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Saturday, October 19, 2019

HP 12C: Total Sales Tax with Rounded Amounts

HP 12C:  Total Sales Tax with Rounded Amounts




Introduction

The following program calculates the total invoice with the total sales tax.   Each time sales tax is calculated, the amount is rounded to two decimal places.

For example:

What is the total invoice for the purchase of three taxable items, if the sales tax is 9.5%. 

$19.95
$32.85
$47.50

The calculation:

19.95 + round(19.95 * .095,2)
+ 32.85 + round(32.85 * .095,2)
+ 47.50 + round(47.50 * .095,2)


= 19.95 + 1.90
+ 32.85 + 3.12
+ 47.50 + 4.51

= 109.83

Rounding to 2 Decimal Places 

The FIX 2 mode rounds results to 2 decimal places, but for the purposes the display only.  The number retains it's full decimal expansion.

When you want to use the rounded amount, we can use the following routine:

In fixed 2 mode:  [ f ] 2

...
1
EEX
2
*
ENTER   // makes a duplicate of the number
FRAC   // takes the fraction
.
5
x<>y   
x≤y   // is the fraction part less than 0.5
GTO  (A)   // go to line where (A) is

R↓  // fraction part is more than 0.5
+
GTO (B)

R↓   // (A)
R↓

ITNG  // (B), finalize the rounded number
1
EE
2
÷    // rounded number in the stack
...

Example:  425/118 = 3.60 in the display, shows 3601694915 when pressing [ f ] (PREFIX)

After this routine, we have 3.60, shows 3600000000 when pressing [ f ] (PREFIX)

Instructions:
1.  Enter the tax rate.
2.  Press [ f ] (PRGM), [R/S]
3.  Enter the item's cost, press [R/S]
4.  For subsequent items, enter the cost, then [R/S]
5.  When finished, press [RCL], 1 to recall total rounded sales tax.  Press [RCL], 2 to recall the total invoice.

I have program set to pause to show the rounded sales tax when each cost is entered. 

Program:
(Step ##: key code, key)
01:  44,0  STO 0
02:  42, 2  FIX 2
03:  35,  CLx
04:  44, 1 STO 1
05:  44, 2 STO 2
06:  31  R/S
07:  45, 0  RCL 0
08:  25   %
09:  1     1
10:  26   EE
11:  2     2
12:  20   *
13:  36   ENTER
14:  43, 24  FRAC
15:  48    .  (decimal point)
16:  5      5
17:  34   x<>y
18:  43, 34  x≤y
19:  43, 33, 23  GTO 23
20:  33   R↓
21:  40   +
22:  43, 33, 25   GTO 25
23:  33  R↓
24:  33  R↓
25:  43, 25  ITNG
26:  1    1
27:  26  EEX
28:  2     2
29:  10   ÷
30:  43, 31   PSE
31:  44, 40, 1   STO+ 1
32:  40   +
33:  44, 40, 2   STO+ 2
34:  31   R/S
35:  43, 33, 07  GTO 07

Example:
Sales Tax Rate:  9.5%
Item Costs:  $14.35, $18.99, $39.99, $23.64

Keystrokes:
9.5  [ f ] (PRGM) [R/S]
14.35 [R/S]
18.99 [R/S]
39.99 [R/S]
23.64 [R/S]

R1:  Total rounded sales tax:  9.21
R2:  Total invoice:  106.18

Eddie

All original content copyright, © 2011-2019.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Python: Drawing a Ring of Circles

Python: Drawing a Ring of Circles The goal: Draw a number of circles that revolve around the origin (0,0). The center of each circle i...