0
Quotient and remainder
Can anyone explain briefly... I didn't get this
5 Respuestas
+ 2
since it is python 3 there are certain changes the "/" now acts as a float division.. and the output changes to float..
but before python 3, i.e. in python 2.x the division was same as that in c/c++ and java
+ 1
in maths when u divide a number u get remainder and quotient ..
but in computer..
when u divide u just get quotient.. like :
a=8; b=2;
c=a/b; //output c=4
and when u do modulus operation u get remainder.. like:
a=8; b=2;
c=a%b; //output c=0 SINCE THEIR'S NO REMAINDER..
but if u pass a=5; b=2; c=a%b; //Output is c=1
0
Oh tqq..
0
Can you please explain..
>>>8/2
4.0
How decimal values are printed
0
You just read the last slide again.....the complier secretly convert the int values to float. That's the answer!