[Tutor] (no subject)
Brad Desautels
outsideme99 at live.com
Sat Apr 23 00:02:00 CEST 2011
Hello, I am just learning Python 3.0 and I am working on this problem. I
need to know what the output would be. Can anybody help
Thanks,
Brad
class Bozo:
def __init__(self, value):
print("Creating a Boso from:" , value)
self.value = 2 * value
def clown(self, x):
print(x * self.value)
return x + self.value
def main():
print("Clowning around now.")
c1 = Bozo(3)
c2 = Bozo(4)
print(c1.clown(3))
print(c2. clown(c1.clown(2))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110422/1fe97cae/attachment-0001.html>
More information about the Tutor
mailing list