[IPython-user] [beginner] problem with _
Sat Nov 22 14:25:51 CST 2008
The problem is just that ball_variables.py does not return 1.2342 - it
simply prints it (that's why there was no 'Out: ' in front of it.
try this to check if _ is working properly:
In : 1.2342
In : _*10
If this example works for you, then you just need to add a return
statement to ball_variables.py, something like this:
print 5*0.6 - 0.5*9.81*0.6**2
return 5*0.6 - 0.5*9.81*0.6**2
David, on 2008-11-22 08:02, wrote:
> Hello list,
> I am just beginning teaching myself IPython, and I am stumbling.
> Following the steps in a book on Computer Programming (Langtangen), the
> author gives the following example:
> In : run ball_variables.py
> In : _*10
> Out: 12.341999999999999
> That is, he argues that with an underscore "_" the last result can be
> However, I cannot reproduce this behaviour. I am running
> Python 2.5.2 (r252:60911) with IPython 0.8.1.
> Could someone please be so kind and let me know what the mistake is?
> IPython-user mailing list
More information about the IPython-user