Executing Arc Program in Python -


i have wrote arc program use turtleworld execute. result right. in serious issue, can reduce code & can explain me code have wrote. didn't concept. program in exercise session of book

from swampy.turtleworld import * world = turtleworld() bob = turtle()  def arc(t=bob, r=50, angle=360):     arc_length = 2 * 3.14 * r * angle / 360     n = int(arc_length / 3) + 1     step_length = arc_length / n     step_angle = float(angle) / n     in range(n):         fd(t, step_length)         lt(t, step_angle)  arc() wait_for_user() 


Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -