[Tutor] Exercises for Classes and OOP in Python
Alan Gauld
alan.gauld at btinternet.com
Mon Feb 23 09:40:07 CET 2009
"Senthil Kumaran" <orsenthil at gmail.com> wrote
> I am looking for a good material that would provide exercises (and
> possibly solutions to demo exercises) that illustrates the Object
> Oriented Programming constructs in Python. Can pointers?
I'm not sure what exactly you have in mind but most tutorials
will cover OOP and you can generally take their examples
and expand them in different ways to explore the features.
Similarly most software problems can have an OOP solution
so you could simply find OOP altrernatives to exercises you
have already done in a non OOP way.
Or ar you looking for something along the line of:
1) define a Shape class
2) define a circle square and triange from the shape
3) add a class attribute to your shape class
4) use polymorphic methods to embellish your shape classes
etc?
Those kinds of exercises are easy enough to invent yourself.
And other than practicing the syntax won't help much in real-world
type scenarios. IMHO
HTH,
Alan G.
More information about the Tutor
mailing list