Feb-23-2020, 07:24 PM
Basically:
2. Functions defined within a class should have the first argument as self.
3. Instantiate the class before you call a related function. Note the syntax.
K?
class Test_it_out: def test_it(self, a, b): return a*b class Test_it_in : def foobar(self, c, d) : life = Test_it_out() return life.test_it(c,d) alpha = Test_it_in() print(alpha.foobar(5,6))1. Class is not capitalized.
2. Functions defined within a class should have the first argument as self.
3. Instantiate the class before you call a related function. Note the syntax.
K?