Hi All, Can someone please explain the maths behind OPT.2.2 and OPT.2.3. I dont really understand what the results should even look like let alone how to get them. Maths is not a strong point for me. Thanks.
OPT.2.2 is a little tricky because you need to iterate over two loops, one for x and one for y, in order to find the values of x and y where y == x**2 + 1. The bit about domains means that you have loop through values of x from -5 to 5 and values of y from 0 to 10. Here's the solutions I got: [(-3, 10), (-2, 5), (-1, 2), (0, 1), (1, 2), (2, 5), (3, 10)] 2.3 is similar, but they don't give you the equation. The equation for a circle of radius 5 is x**2 + y**2 == 5 My solutions for OPT.2.3: [(-2, -1), (-2, 1), (-1, -2), (-1, 2), (1, -2), (1, 2), (2, -1), (2, 1)] I think there's a recitation video that helped me with this.
Thanks pdinch. How do you know what the ranges are for 2.3? It appears as though you changed y's range to range(-5,6) also? Thanks for posting your answers. I now have the same. :-)
Join our real-time social learning platform and learn together with your friends!