Python Tutorial Section 4

This is quite a short section and so this will be a short post. There is no reading, just two assignments.

Worksheet 4.1.1

This was relatively straight forward. I simply created a function which solved the quadratic equation, but also checked for linear quations. It doesn't check for complex solutions though but...

Worksheet 4.1.2

...this one does. This felt sort of futile because I was just piecing together an algebraic response by removing the complex components and then re-adding them in.

Any ways, I got it all working except I don't have any immediate thoughts on sorting complex roots to ensure that they'll make no matter the order.

Both solutions are on github