%s got the job done!!!
Thank you all for the info and links,
I appreciate it!
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
Python does not support REAL numbers. It has float number, which
are approximations of real numbers. They behave almost, but not
quite, like you might expect.
It also has Decimal numbers. They also approximate real numbers,
but slightly differently. They might behave more like you'd ex
Alvaro Lacerda wrote:
> The code I wrote is supposed to ask the user to enter a number;
> Then tell the user what's going to happen to that number (x / 2 + 5) ;
> Then give the user an answer;
>
> I succeeded getting results from even numbers, but when I try diving an
> uneven number (i.e. 5) by
2012/12/30 Alvaro Lacerda :
> The code I wrote is supposed to ask the user to enter a number;
> Then tell the user what's going to happen to that number (x / 2 + 5) ;
> Then give the user an answer;
>
> I succeeded getting results from even numbers, but when I try diving an
> uneven number (i.e. 5
On 30-12-2012 23:37, Alvaro Lacerda wrote:
>
> I'm trying to get full number result using the %d command
Try %f instead. %d is the formatting symbol for integer numbers.
See http://docs.python.org/2/library/stdtypes.html#string-formatting-operations
Or have a look at what string.format() can do:
On Sun, Dec 30, 2012 at 5:37 PM, Alvaro Lacerda wrote:
> The code I wrote is supposed to ask the user to enter a number;
> Then tell the user what's going to happen to that number (x / 2 + 5) ;
> Then give the user an answer;
>
Try x / 2.5 + 5
>
> I succeeded getting results from even numbers, b
The code I wrote is supposed to ask the user to enter a number;
Then tell the user what's going to happen to that number (x / 2 + 5) ;
Then give the user an answer;
I succeeded getting results from even numbers, but when I try diving an uneven
number (i.e. 5) by 2, I get only the whole number (i.