Dp- Robot Paths

Hello sir/Ma’am,


here is my code for this question. When I try to run it on CB IDE error comes , “there was some error while running the code” . Could you please tell what’s wrong in thiis???

I think there was some problem with IDE. Now it’s working fine!!!