0
Can someone explain quotient and remainder?
4 odpowiedzi
+ 2
If you have to divide 13 by 4.
Then it means nothing but asking some one ,that how many time s/he can subtract 4 fully out of 13.
So,....
(1)13-4 =9
(2)9-4=5
(3)5-4=1
So we can subtract 4 ,3times out of 13 fully and after that 1 remains ..
So...1 is remainder and what times (means 3) 4 was subtracted fully was quotient.
So,as multiplication is addition,similarly division is subtraction.....no. of times.
0
mathematically, quotient is the number obtained by dividing two numbers and remainder is the number remaining when two numbers are divided.
x = 5
y = 10
z = 13
#quotient
a = y / x
print a
#output is 2
a = y % x
print a
#output is 0
a = z / x
print a
#output is 2.6 in Python 3
a = z // x
print a
#output is 2 since // is integer division
a = z % x
print a
#output is 3
hope this helps some.
0
couldn't get a better answer, thanks
0
Thanks Mr.Sanjeev