[Tutor] eval and floating point

Mr Gerard Kelly s4027340 at student.uq.edu.au
Thu Jan 15 03:19:04 CET 2009

Thanks very much

I've noticed that the eval() function gives an integer, so eval("3/2")
gives back 1. float(eval("3/2")) doesn't seem to work, any way to get a
floating point number back with eval()?

I know you can just do ("3./2."), but is there any way to do it with
just ("3/2")?

More information about the Tutor mailing list