"Andrew Martin" <[email protected]> wrote
However, when I did so I got this error: "TypeError: unbound method
getY()
must be called with Projectile instance as first argument (got
nothing
instead) "
def main():
angle, vel, h0, time = getInputs()
cball = Projectile(angle, vel, h0)
cball is a Projectile instance
zenith = 0.0
while cball.getY() >= 0:
So this is fine
cball.update(time)
if Projectile.getY > zenith:
zenith = Projectile.getY()
But what are you doing here?
You are trying to compare the getY method of the class with a floating
point number?
Then you call getY using the class rather than the instance?
I'm confused - and so is Python...
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor