+ 1

What is the difference between single slash and double slash in Python?

8th Jul 2022, 6:37 PM
šŸŒ»EmĆ Ć¢Ć¢Ć¢šŸŒ»
šŸŒ»EmĆ Ć¢Ć¢Ć¢šŸŒ» - avatar
3 Answers
+ 1
/ is division: 3 / 2 = 1.5 // is floor division (integer division): 3 // 2 = 1
8th Jul 2022, 6:43 PM
Lisa
Lisa - avatar
+ 2
There are round(), ceil() and floor() functions in the math module.
8th Jul 2022, 7:38 PM
Lisa
Lisa - avatar
+ 1
When // is for Floor which Expression are for Round or Ceiling?
8th Jul 2022, 7:34 PM
Felix Alcor
Felix Alcor - avatar