0

Quotient and remainder

Can anyone explain briefly... I didn't get this

13th Jul 2017, 3:04 PM
Roshita Patnaik
Roshita Patnaik - avatar
5 ответов
+ 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
13th Jul 2017, 3:42 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 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
13th Jul 2017, 3:12 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
0
Oh tqq..
13th Jul 2017, 3:27 PM
Roshita Patnaik
Roshita Patnaik - avatar
0
Can you please explain.. >>>8/2 4.0 How decimal values are printed
13th Jul 2017, 3:29 PM
Roshita Patnaik
Roshita Patnaik - avatar
0
You just read the last slide again.....the complier secretly convert the int values to float. That's the answer!
13th Jul 2017, 3:36 PM
Harsh Kumar
Harsh Kumar - avatar