+ 10

What is the difference between Forward Slash ' / ' and Modulo ' % ' ? (Pyhton Language)

I've found that the output of operation with both Forward Slash ' / ' and Modulo ' % ' have the same function which will produce floats. But why they are different? I still don't get the meaning. Somebody please help me to find out the answer

16th Sep 2018, 5:55 PM
MTMA
10 Respostas
+ 6
/ is for division purpose while % is used to find reminder.
18th Sep 2018, 1:24 PM
S.K
+ 3
forward' / ' will give the quotient of operation modulo will give the reminder of operation for example 10/2 = 5 10%2=0(gives reminder)
21st Jan 2019, 3:51 PM
Aditya Bhansali
Aditya Bhansali - avatar
+ 2
/ is used to get quotient. % is used to get remainder
31st Jan 2019, 3:42 PM
anitha
+ 1
initially % i thought this is percentage..damn ;)
30th Sep 2018, 1:51 PM
arnav singh
arnav singh - avatar
+ 1
/ is for division whereas % is mod operator which gives remainder..
1st Nov 2019, 5:28 PM
Rajiv Kaura
Rajiv Kaura - avatar
+ 1
Forward slash(/) gives the answer in float, while modulo(%) divides and gives the remainder.
21st Feb 2021, 8:18 PM
Mitchell Nwafor
Mitchell Nwafor - avatar
0
To determine the quotient and remainder of a division, use the floor division and modulo operators, respectively. Floor division is done using two forward slashes. The modulo operator is carried out with a percent symbol (%).
22nd Oct 2018, 2:39 PM
Mansi Talavadekar
Mansi Talavadekar - avatar
0
What is the point in the mod operator.
13th Apr 2020, 8:10 AM
Joshua Aquatic
Joshua Aquatic - avatar
0
Hi frnd one equvation 25%3: 25 dividing 3 for 6*4= 24 Also 25-24=1 The remaining for 1 This remaining is 1for answer the question and this modulus ok Another slash '/' Single slash is dividing ok An double slash is 20//6 6*3=18 20/6=3 20/6=3 3+3=6 6/3=3 Answer is 3
7th Jun 2021, 1:48 PM
mani kandan
mani kandan - avatar
- 5
'/' is used to get remainder '%'is used to get quotient
12th Oct 2018, 1:13 PM
Y.Lokesh Reddy
Y.Lokesh Reddy - avatar