AllenDowney / ThinkPython2

LaTeX source and supporting code for Think Python, 2nd edition, by Allen Downey.
Other
2.49k stars 1.65k forks source link

Updated function arc() to be simpler #89

Open abhitrueprogrammer opened 2 years ago

abhitrueprogrammer commented 2 years ago

Updated arc() to just draw a circle but only till the angle required. This approach is simpler than using an obscure formula [n = int(arc_length/3) +1] and doesn't even cause the turtle to be a few pixels away from true destination. Tested using first drawing a circle but then drawing a arc on top of that circle, which perfectly matches it. Its also easier to understand by even the uninitiated in math 14 08 07 python_002942 .