There were two main algorithms in this program that really defined the very core of what this program does (which is simply act like a graphing module in a graphing calculator). The first was range described by a function f(x). In this case, y was the changing variable, and based of each point in x, 'y' would change a certain amount e.g f(x) = tan(x), where f(x) would change based off each value of y. This was described through a for loop where each value of y would appended to a new list, and hence print the y coordinates.
The next challenge was the print each pair coordinate of x and y. I did this using another for loop that first linked the length of either x_value or y_value, and used the range command to interval each individual point for Point(x[i] and y[i]).
No comments:
Post a Comment