Im a beginner. For the sake of learning, I have to write a class in python which accepts at most 3 different arguments (a,b,c): something like
class random(object):
def __init__(self,a,b,c):
blah blah blah
How do I make it so that:
if no argument is entered, it does one thing.
for example:
"test=random()", in this case assume a=b=c=0
if one argument is entered, it does another thing.
for example:
"test=random(2)", in this case a=2 ,b=c=0, and then run some case specific codes/instrutctionsand etc
something like how with the builtin function/class "range", where you can use
range(9) range(3,9) range(3,9,2)
if you know what I mean.
thanks