What is the difference between / and //?
I know both produce float numbers
/ will produce floating division Ex: 27/8 = 3.375 // will produce integer division Ex: 27/8 = 3
/
27/8 = 3.375
//
27/8 = 3
Hope this helps!
ahh!! thank you~!!!!
/ is used for regular division, and produces float numbers.
// is used for integer division, and only produces integers, dropping any remainder.
for example, 9//2 = 4 , since 2 goes into 9 4 whole times.
thanks so much!!!
/ is for regular division and // is used to indicate integer division. 10/3=3.33 but 10//3=3 because 3 goes into 10 three times.
You use / when you want division that answer only keeps the whole integer and drop the remainder
You use / when you want division that answer will be a float, which comes out to be a decimal number, ...
/ is used as a regular division and it produces floating numbers. For example- 22/3 = 7.33
// is used as a integer division and produces integers and real numbers, leaving out the remainders. For example- 24/5 = 4 (5*4=20)