Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 14
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 The number you entered is very big. And as for a compiled and interpreted language like python. They normally act like calculators witbout exceeding an output number of length 16. So when the number to output is greter than 16. It will start to be converted into exponential form to the power of 10
18th Jun 2020, 11:01 AM
Josaphat NGOGA UWIZEYE
Josaphat NGOGA UWIZEYE - avatar
+ 17
its scientific notation ... to represent number ... 1e+x is 1*10^x
17th Jun 2020, 5:30 PM
Prashanth Kumar
Prashanth Kumar - avatar
+ 10
its scientific notation ... to represent number ... 1e+x is 1*10^x.
19th Jun 2020, 4:29 AM
BUCHUPALLI VIMALA REDDY
BUCHUPALLI VIMALA REDDY - avatar
+ 9
I hope this will help you 𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 🤗🤗 10**50 = 1e+50 1/(10**50) = 1e-50 Since int has max capacity of 16 hence it cannot handle 15< digits If it provides a decimal: suppose 1.2345678987654e-50 is approximately equal to 1.2345678987654/(10**50)
17th Jun 2020, 5:57 PM
Namit Jain
Namit Jain - avatar
+ 8
Python is writing the answer in scientific notation. Google scientific notation for further details..
17th Jun 2020, 5:20 PM
Mohamad Kamar
Mohamad Kamar - avatar
+ 5
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 num1 = 7777......... is way bigger than 777. For a number as small as 777, it's okay. But the number in the code has a lot of 7s. Python instead of showing so many digits, shows it in the scientific form.
17th Jun 2020, 5:26 PM
XXX
XXX - avatar
+ 5
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 as much as I know, just like Python knows how 1 < 2, it might have a specific limit where it starts showing numbers in the scientific form. If the float (important thing, it happens only with floats. If you instead wrote num1//num2, it would show the full result) numeral > the limit, it shows it in the scientific form.
17th Jun 2020, 5:28 PM
XXX
XXX - avatar
+ 5
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 yes ...it can be ... but its not that large number ..... it doesn't matters btw ... its just a number ... maybe the representation is different... its like that because the engineers making this language thought that it must be like that
17th Jun 2020, 5:44 PM
Prashanth Kumar
Prashanth Kumar - avatar
+ 5
say if you are working on a data science project and you want to see a number .. will it be good to see 1000000000000000000000000000000000 which wont even fit on screen.... and there are not a single number to deal with in that you may have millions of numbers .. and if each gets printed like this then wouldn't it be annoying...
17th Jun 2020, 5:46 PM
Prashanth Kumar
Prashanth Kumar - avatar
+ 5
That is called IEEE754 Double Precision Floating Point Notation with base 10. Division for Python is always a Floating Point Operation(which is why C coders generally don't prefer Python). It always stores the result of a division as a float. Python exclusively uses the Double Precision Floating Point container for float. The result you see is a conversion of that float to str in Python via the STDOUT buffer. The buffer can't handle character conversion for this value, so it uses the field conversation, converting the Exponent and Mantissa seperately then scaling it by 10. Double : 0.<Mantissa>e+<Exponent> Notation : <Mantissa x 10>e+<Exponent-1> You can read about Double Precision Floating Point Notation here… https://en.m.wikipedia.org/wiki/Double-precision_floating-point_format
17th Jun 2020, 6:22 PM
Anubhav Mattoo
Anubhav Mattoo - avatar
+ 5
1.111111111111111e*290
18th Jun 2020, 7:54 AM
Jaykumar Khalote
Jaykumar Khalote - avatar
+ 5
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 there is no reason behind it. I may say that that is a standard for calculators. Not exceeding an output number of 16 is a standard set. And as you know calculators are also programmed so every programming language responds in the same way a calculator can respond. Another feature you will find similar to calculators... you will see that they can not exceed a number output of exponent 10^99...
18th Jun 2020, 4:29 PM
Josaphat NGOGA UWIZEYE
Josaphat NGOGA UWIZEYE - avatar
+ 4
Sorry, but I don't see any problem with the output. 7777...../7 = 111...... which can be written as 1.1111... * 10^something. Which is exactly what the output is 1.1111....e290
17th Jun 2020, 5:18 PM
XXX
XXX - avatar
+ 4
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 for example, let the output be float(11111..... about 100 times). It is important to note that it happens only with floats. Python must be having a limit, maybe around (100 thousand).0 [just my guess] So when printing to the screen, it will check, if the number is greater than the limit. In this case, yes, so it will print it in scientific form. Else, it will print in normal form.
17th Jun 2020, 5:35 PM
XXX
XXX - avatar
+ 4
The number you enter is so big that why python convert the answer in scientific form.
18th Jun 2020, 2:22 PM
govind bansal
govind bansal - avatar
+ 3
1.1¹⁵e+290
18th Jun 2020, 12:42 PM
Jaykumar Khalote
Jaykumar Khalote - avatar
+ 3
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 just because it is easier to read. As everything is an object in Python, and as what will be printed is defined in the __repr__ function of the object, the developers might have decided to return the number in exponential form when the number exceeded the length of 16
18th Jun 2020, 2:08 PM
XXX
XXX - avatar
+ 3
The number you have entered is very big.So your answer is in scientific notation.
18th Jun 2020, 3:57 PM
Sanjay krishna
Sanjay krishna - avatar
+ 2
If numbers become big, python uses scientific notation
17th Jun 2020, 5:24 PM
Mohamad Kamar
Mohamad Kamar - avatar
+ 2
Python is a very advanced language compared to c or java. In not so advanced languages such as c or java, you have to specify the data type to bound the length of a data or number. But in python, there is no need for data type so if the output is very big or very small for the memory python will automatically try to fit the number in memory so the look of the number is changed in your answer as it is represented in scientific form.
19th Jun 2020, 6:06 AM
Joy Karmoker