""" Example code from oct 13; class that represents a function with a parameter. """ class Y: def __init__(self, v0): self.v0 = v0 self.g = 9.81 def value(self, t): return self.v0*t - 0.5*self.g*t**2 y = Y(v0 = 3) # lag instans (objekt) height = y.value(0.1) # beregn funksjonsverdi