Ask Question
11 April, 13:40

30 mins and I will give Brianlest what is the difference between a method and a function in which ways are they similar why do you think python makes a distinct between methods and functions

+3
Answers (1)
  1. 11 April, 17:11
    0
    For 1), you should also add that methods in C+ + are called member functions. Thus, the difference between functions and methods in this context is analogous to the difference between functions and member functions in C++. Furthermore, languages like Java only have methods. In this case, functions would be analogous to static methods and methods would have the same meaning. For 2), you should add that a method is able to operate on the private instance (member) data declared as part of the class. Any code can access public instance data. A function is a mathematical construct. I would say all methods are functions but not all functions are methods
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “30 mins and I will give Brianlest what is the difference between a method and a function in which ways are they similar why do you think ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers