ezoic

Wednesday, January 25, 2017

An example looking closer to class in python

An example looking closer to class in python:

class Complex:
       def  __init__(self,realpart,imagpart):
             self.r=realpart
             self.i=imagpart

x=Complex(3.0,-4.5)
print x.r, x.i

You will get the output:

3.0  -4.5




No comments:

Post a Comment

looking for a man

 I am a mid aged woman. I live in southern california.  I was born in 1980. I do not have any kid. no compliacted dating.  I am looking for ...