Move arcs and rotate with Python

Hello there,

I’m trying to move a bunch of arcs and rotate them so that I’ll get one smooth curve as shown below. I feel like I’m almost there but I can’t get why the angles are not correct. Can anyone help with this?
The arcs are in the random order and to get smooth lines they are flipped in alternating order.

You might want to see Truchet Tiles

Never mind, solved it. Problem was curve parameters. Nothing wrong with python.