#Python "Why the output is 0" | Sololearn: Learn to code for FREE!
0

# #Python "Why the output is 0"

https://code.sololearn.com/ck6t0jtEiNeB/?ref=app

4th Nov 2018, 9:37 AM
Fatih Yalçın
7 Antworten
+ 11
As I can see the values of 9**19 and float(9**19) : The float value becomes more significant as it becomes very large (scientific notation), therefore on converting it back to int the value changes. You can try printing values of 9**19 and float(9**19) and then int(float(9**19))
4th Nov 2018, 10:22 AM
Shubham Sharma
+ 10
int of False is 0 and int of True is 1
4th Nov 2018, 9:46 AM
Yash✳️
+ 9
2**3 == 3**2 //false 2*2*2 == 3*3 // 8 == 9, that's why...
4th Nov 2018, 9:40 AM
Valen.H. ~
+ 2
False 0 and true 1
15th Nov 2018, 5:24 AM
Mohsin Khan
+ 1
Using float can lead you to lose some precision then, converting it to int, get you a "less" precised int of which you expected
4th Nov 2018, 10:31 AM
KrOW
0
Because 9**19 is the same as 9**19
4th Nov 2018, 9:38 AM
PureLogicality
0
I can also tj same thing
2nd Jul 2019, 5:09 PM
Sent
Heute heiß
PHP
0 Votes
HELP ME
1 Votes
Array
0 Votes