Post

Python Programming
Python Programming@PythonPr·
Python Question / Quiz; What is the output of the following Python code, and why? Comment your answers below!
Python Programming tweet media
English
35
17
147
14.3K
Sergei Kotov
Sergei Kotov@kotov_dev·
Answer: B (3). The // is floor division -- it divides and rounds DOWN to the nearest integer. 10 // 3 = 3 (not 3.33).
English
0
0
0
668
Premakumar Thevathasan (Prem Iyer)
Premakumar Thevathasan (Prem Iyer)@KumarT00623760·
@PythonPr This uses the floor division operator (//), which returns the largest integer less than or equal to the result of the division. Calculation: 10 / 3 = 3.333... 10 // 3 performs floor division, so it returns 3 Answer: B) 3
English
0
0
0
451
TechLatest.Net
TechLatest.Net@TechlatestNet·
@PythonPr this is super handy , love seeing python tricks that save time
English
0
0
0
56
Gaurav Prajapati
Gaurav Prajapati@I_am_gaurav68·
@PythonPr Correct Answer: Option B. Here floor division is going on which gives quotient as a result.
English
0
0
0
79
laso
laso@lasitolas·
@PythonPr B...double //rounds of to the nearest number
English
0
0
0
20
Paylaş