1

This is my code:

m = int(input(""))
p= 3.00*10*10*10*10*10*10*10*10
c = p*p
E = m * c

print(E)

The answer is 19e+16.

But I don't want the scientific notation: I want the number.

khelwood
  • 55,782
  • 14
  • 81
  • 108

2 Answers2

2

Actually it is not from VSCode, Python prints that way for better readability. You can print the long form with the help of string formatting. When you apply precision it will expand the printed value:

E = 3.00 * 100 * 100 * 100 * 100 * 100 * 100 * 100 * 100
print(E)
print(f"{E:.1f}")
print(f"{E:.10f}")

output:

3e+16
30000000000000000.0
30000000000000000.0000000000
S.B
  • 13,077
  • 10
  • 22
  • 49
0

Possible duplicate of:
How to suppress scientific notation when printing float values?
TL;DR

print('{:f}'.format(E))
Harsh
  • 126
  • 6