When using int() and divide two numbers for example 5:2 will I see an answer like 2.5 or not? | SoloLearn: Learn to code for FREE!

0

When using int() and divide two numbers for example 5:2 will I see an answer like 2.5 or not?

11/30/2017 8:00:38 PM

Tilman Peveling

1 Answer

New Answer

0

if you divide two integer values, you'll be given a integer returned (Integer division is performed). So, 2 fits into 5 only 2 times. So 5/2=2 The decimal point is essentially not included.