Ok I think I got it. Thanks everybody. And sorry for the late reply. My
classes have just started so learned python unfortunately must be bumped
down on the priority list
On Thu, Aug 26, 2010 at 4:32 AM, Alan Gauld wrote:
>
> "Andrew Martin" wrote
>
> I want to compare zenith, a floating point
"Andrew Martin" wrote
I want to compare zenith, a floating point number, with the current
y value?
I thought the current y value could be retrieved by Projectile.getY.
Projectile.getY is a reference to the getY method of the Projectile
class.
(See the separate thread on function objects f
Andrew,
For starters you have some errors in the way you are trying to access
methods from within a class instances. For example in your code in line 7
and 8,
def main():
angle, vel, h0, time = getInputs()
cball = Projectile(angle, vel, h0)
zenith = 0.0
while cball.getY() >=
There are 2 ways to get the ypos value one is cball.ypos and another is
call.getY() both will give u the current ypos.
--nitin
On Thu, Aug 26, 2010 at 7:26 AM, Andrew Martin wrote:
> All I want to do is add a line that displays that maximum height the
> cannonball reaches. I created a variable z
On 8/25/10, Andrew Martin wrote:
> All I want to do is add a line that displays that maximum height the
> cannonball reaches. I created a variable zenith to store the highest y
> value. I then wanted to compare the current y value of the cannonball to
> zenith while the cannonballs y value is grea
All I want to do is add a line that displays that maximum height the
cannonball reaches. I created a variable zenith to store the highest y
value. I then wanted to compare the current y value of the cannonball to
zenith while the cannonballs y value is greater than zero. If the
cannonballs current
"Andrew Martin" 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 Project