Does a division by an integer really deliver reasonable output? | Sololearn: Learn to code for FREE!

-3

Does a division by an integer really deliver reasonable output?

7/26/2016 11:38:47 PM

moerunner

4 Answers

New Answer

+2

you might wanna rephrase your question coz its not making any sense right now

+1

I think, he is referring to the often asked problem of rounding and typecasting during division for almost all programming languages. If this was your intention, this was a great question. You know, you have two operators '/' and '//'. The first one casts your division into float and the second one rounds it into an integer and always rounds down to the next int in the process.

0

it depends on what you're dividing with the integer, cause you can't divide a string with an integer that's like saying; python/3

0

sorry Samuel my question concerned type casting i.e. whether it must be 1./2. rather than 1/2 or 1/2. or 1./2 for the expected result 0.5 you know some languages cause performs with non floats when you divide them