-
Notifications
You must be signed in to change notification settings - Fork 0
Functional Programming
agrov edited this page Feb 14, 2020
·
2 revisions
- The below function is a pure function. It is taking in the Student information(X_test) for whom the grade needs to be predicted and returning the predicted grade without changing the Student information in any way.It can be viewed in grade.py file in my project repository.
2)In the above showed function, I am also using lambda, which is anonymous function in Python. lambda functions behave in the same way as regular functions that are declared using the def keyword, but without any name.
3)Below is an example of higher order function. Function update in Python file app.py here returns the values as a function which takes a few values and is being passed on on the HTML page. On the HTML page, those passed values are being used to display the results in the table