Class and function
Sharkclass¶
class methods:
class functions & static methods:
Shark.swimclass(a)¶
Teach them how to swim
Parameters
self:
obj– Instance ofShark.
Returns
bool– Did they succeed.
Source Code
1 2 3 4 5 6 7 8 | |
Shark.be_awesome(self)¶
Take the max between two numbers
Parameters
x:
float– Description of parameterx.y:
float– Description of parametery.
Returns
float– Description of returned object.
Source Code
1 2 3 | |
Shark.swimstatic(self, a)¶
Teach them how to swim
Parameters
self:
obj– Instance ofShark.
Returns
bool– Did they succeed.
Source Code
1 2 3 4 5 6 7 8 | |
maxi(x: int, y: int = 5)¶
Take the max between two numbers
Parameters
x:
float– Description of parameterx.y:
float– Description of parametery.
Returns
float– Description of returned object.
Source Code
1 2 3 | |
maxi2pourvoir(x, y)¶
Take the max between two numbers
Parameters
x:
float– Description of parameterx.y:
float– Description of parametery.
Returns
float– Description of returned object.
Source Code
1 2 3 | |