-3

By doing this:

j = pow(p1, k1)

I get this:

j: 2.128e-100

How can I display it without the scientific notation? Something like this:

j: 2.128
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
  • 4
    `2.128` isn't what the number actually is, though. You could format it, but without that notation there are a lot of zeros. – jonrsharpe Nov 03 '16 at 18:17
  • yeah I know, but isn't there any way to just get the number and ignore the zeros? (i'm sorry, i'm still learning python) – catinthenet Nov 03 '16 at 18:20

1 Answers1

2

You can use string formatting:

>>> print('{:.103f}'.format(2.128e-100))
0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002128
Daniel
  • 42,087
  • 4
  • 55
  • 81