=============Function example=============
def Function(a,b)
c=a*b
d=a+b
return c, d
==========Class example==================
class Object:
def __init__(self, attribute_a, attribute_b, attribute_c):
self.attribute_ago = attribute_a
self.attribute_bgo = attribute_b
self.attribute_cgo = attribute_c
def methodwalk(self):
self.methodwalk = self.attribute_ago + self.attribute_bgo + self.attribute_cgo
return self.methodwalk
def methodfly(self):
self.methodfly = self.attribute_ago * self.attribute_bgo * self.attribute_cgo
return self.methodfly
parameter_a = 1
parameter_b = 2
parameter_c = 3
obj1 = Object(parameter_a, parameter_b, parameter_c)
walk1 = obj1.methodwalk()
fly1 = obj1.methodfly()
print("Walk:", walk1)
print("Fly:", fly1)